checkoff 0.222.0 → 0.225.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/checkoff.gemspec +10 -5
  3. data/lib/checkoff/attachments.rb +1 -0
  4. data/lib/checkoff/cli.rb +1 -1
  5. data/lib/checkoff/clients.rb +2 -1
  6. data/lib/checkoff/custom_fields.rb +2 -1
  7. data/lib/checkoff/events.rb +2 -1
  8. data/lib/checkoff/internal/asana_event_enrichment.rb +1 -0
  9. data/lib/checkoff/internal/asana_event_filter.rb +1 -0
  10. data/lib/checkoff/internal/config_loader.rb +2 -2
  11. data/lib/checkoff/internal/logging.rb +6 -5
  12. data/lib/checkoff/internal/project_hashes.rb +1 -0
  13. data/lib/checkoff/internal/project_selector_evaluator.rb +2 -1
  14. data/lib/checkoff/internal/project_timing.rb +1 -0
  15. data/lib/checkoff/internal/search_url/custom_field_param_converter.rb +1 -0
  16. data/lib/checkoff/internal/search_url/custom_field_variant.rb +1 -0
  17. data/lib/checkoff/internal/search_url/date_param_converter.rb +1 -0
  18. data/lib/checkoff/internal/search_url/parser.rb +1 -0
  19. data/lib/checkoff/internal/search_url/results_merger.rb +1 -0
  20. data/lib/checkoff/internal/search_url/simple_param_converter.rb +1 -0
  21. data/lib/checkoff/internal/search_url.rb +1 -0
  22. data/lib/checkoff/internal/section_selector_evaluator.rb +2 -1
  23. data/lib/checkoff/internal/selector_classes/common/function_evaluator.rb +1 -0
  24. data/lib/checkoff/internal/selector_classes/common.rb +1 -0
  25. data/lib/checkoff/internal/selector_classes/function_evaluator.rb +1 -0
  26. data/lib/checkoff/internal/selector_classes/project/function_evaluator.rb +1 -0
  27. data/lib/checkoff/internal/selector_classes/project.rb +1 -0
  28. data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -1
  29. data/lib/checkoff/internal/selector_classes/section.rb +1 -0
  30. data/lib/checkoff/internal/selector_classes/task/function_evaluator.rb +1 -0
  31. data/lib/checkoff/internal/selector_classes/task.rb +1 -0
  32. data/lib/checkoff/internal/selector_evaluator.rb +5 -4
  33. data/lib/checkoff/internal/task_hashes.rb +1 -0
  34. data/lib/checkoff/internal/task_selector_evaluator.rb +2 -1
  35. data/lib/checkoff/internal/task_timing.rb +1 -0
  36. data/lib/checkoff/internal/thread_local.rb +1 -0
  37. data/lib/checkoff/monkeypatches/resource_marshalling.rb +1 -0
  38. data/lib/checkoff/my_tasks.rb +2 -1
  39. data/lib/checkoff/portfolios.rb +12 -9
  40. data/lib/checkoff/project_selectors.rb +1 -0
  41. data/lib/checkoff/projects.rb +3 -1
  42. data/lib/checkoff/resources.rb +1 -0
  43. data/lib/checkoff/section_selectors.rb +1 -0
  44. data/lib/checkoff/sections.rb +4 -4
  45. data/lib/checkoff/subtasks.rb +1 -0
  46. data/lib/checkoff/tags.rb +67 -17
  47. data/lib/checkoff/task_searches.rb +1 -0
  48. data/lib/checkoff/task_selectors.rb +1 -0
  49. data/lib/checkoff/tasks.rb +2 -2
  50. data/lib/checkoff/timelines.rb +1 -0
  51. data/lib/checkoff/timing.rb +1 -0
  52. data/lib/checkoff/version.rb +2 -1
  53. data/lib/checkoff/workspaces.rb +2 -1
  54. data/lib/checkoff.rb +1 -0
  55. data/rbi/checkoff.rbi +4529 -0
  56. data/sig/checkoff.rbs +3749 -0
  57. metadata +4 -205
  58. data/.circleci/config.yml +0 -291
  59. data/.envrc +0 -9
  60. data/.git-hooks/pre_commit/circle_ci.rb +0 -25
  61. data/.git-hooks/pre_commit/punchlist.rb +0 -51
  62. data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -76
  63. data/.gitattributes +0 -6
  64. data/.gitignore +0 -61
  65. data/.markdownlint_style.rb +0 -3
  66. data/.mdlrc +0 -1
  67. data/.overcommit.yml +0 -114
  68. data/.rubocop.yml +0 -143
  69. data/.rubocop_todo.yml +0 -90
  70. data/.solargraph.yml +0 -35
  71. data/.yamllint.yml +0 -8
  72. data/CODE_OF_CONDUCT.md +0 -133
  73. data/CONTRIBUTING.rst +0 -75
  74. data/DEVELOPMENT.md +0 -69
  75. data/GLOSSARY.md +0 -16
  76. data/Gemfile +0 -66
  77. data/Gemfile.lock +0 -336
  78. data/LICENSE +0 -21
  79. data/Makefile +0 -121
  80. data/bin/brakeman +0 -27
  81. data/bin/bump +0 -29
  82. data/bin/checkoff +0 -29
  83. data/bin/console +0 -15
  84. data/bin/overcommit +0 -29
  85. data/bin/overcommit_branch +0 -114
  86. data/bin/rake +0 -29
  87. data/bin/rubocop +0 -27
  88. data/bin/setup +0 -8
  89. data/bin/solargraph +0 -27
  90. data/bin/sord +0 -27
  91. data/bin/spoom +0 -27
  92. data/bin/srb +0 -27
  93. data/bin/srb-rbi +0 -27
  94. data/bin/tapioca +0 -27
  95. data/bin/yard +0 -27
  96. data/config/annotations_asana.rb +0 -254
  97. data/config/annotations_misc.rb +0 -68
  98. data/config/env.1p +0 -2
  99. data/docs/.gitignore +0 -3
  100. data/docs/cookiecutter_input.json +0 -17
  101. data/docs/example_project.png +0 -0
  102. data/fix.sh +0 -534
  103. data/metrics/bigfiles_high_water_mark +0 -1
  104. data/metrics/brakeman_high_water_mark +0 -1
  105. data/metrics/bundle-audit_high_water_mark +0 -1
  106. data/metrics/cane_high_water_mark +0 -1
  107. data/metrics/eslint_high_water_mark +0 -1
  108. data/metrics/flake8_high_water_mark +0 -1
  109. data/metrics/flay_high_water_mark +0 -1
  110. data/metrics/flog_high_water_mark +0 -1
  111. data/metrics/jscs_high_water_mark +0 -1
  112. data/metrics/mdl_high_water_mark +0 -1
  113. data/metrics/pep8_high_water_mark +0 -1
  114. data/metrics/punchlist_high_water_mark +0 -1
  115. data/metrics/pycodestyle_high_water_mark +0 -1
  116. data/metrics/rails_best_practices_high_water_mark +0 -1
  117. data/metrics/rubocop_high_water_mark +0 -1
  118. data/metrics/scalastyle_high_water_mark +0 -1
  119. data/metrics/shellcheck_high_water_mark +0 -1
  120. data/package.json +0 -9
  121. data/rakelib/citest.rake +0 -4
  122. data/rakelib/clear_metrics.rake +0 -9
  123. data/rakelib/console.rake +0 -15
  124. data/rakelib/default.rake +0 -4
  125. data/rakelib/doc.rake +0 -6
  126. data/rakelib/gem_tasks.rake +0 -3
  127. data/rakelib/localtest.rake +0 -4
  128. data/rakelib/overcommit.rake +0 -6
  129. data/rakelib/quality.rake +0 -4
  130. data/rakelib/repl.rake +0 -4
  131. data/rakelib/test.rake +0 -10
  132. data/rakelib/trigger_next_builds.rake +0 -7
  133. data/rakelib/undercover.rake +0 -8
  134. data/requirements_dev.txt +0 -2
  135. data/sorbet/config +0 -4
  136. data/sorbet/rbi/annotations/.gitattributes +0 -1
  137. data/sorbet/rbi/annotations/activesupport.rbi +0 -453
  138. data/sorbet/rbi/annotations/faraday.rbi +0 -17
  139. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  140. data/sorbet/rbi/annotations/mocha.rbi +0 -34
  141. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  142. data/sorbet/rbi/annotations/webmock.rbi +0 -9
  143. data/sorbet/rbi/dsl/.gitattributes +0 -1
  144. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
  145. data/sorbet/rbi/gems/.gitattributes +0 -1
  146. data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
  147. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
  148. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
  149. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
  150. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  151. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
  152. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  153. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  154. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
  155. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
  156. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
  157. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  158. data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
  159. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
  160. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
  161. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
  162. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  163. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
  164. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  165. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
  166. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
  167. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
  168. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  169. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
  170. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
  171. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
  172. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
  173. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
  174. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
  175. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
  176. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
  177. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
  178. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
  179. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
  180. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
  181. data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
  182. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
  183. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
  184. data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
  185. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
  186. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  187. data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
  188. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
  189. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
  190. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
  191. data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
  192. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
  193. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
  194. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  195. data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
  196. data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
  197. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
  198. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
  199. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
  200. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
  201. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
  202. data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
  203. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
  204. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
  205. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
  206. data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
  207. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  208. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
  209. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
  210. data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
  211. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  212. data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
  213. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
  214. data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
  215. data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
  216. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
  217. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  218. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
  219. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
  220. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
  221. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  222. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
  223. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  224. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
  225. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  226. data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
  227. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
  228. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
  229. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
  230. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7061
  231. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
  232. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
  233. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
  234. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
  235. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
  236. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  237. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  238. data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
  239. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
  240. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
  241. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
  242. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  243. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  244. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
  245. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
  246. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
  247. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  248. data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
  249. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  250. data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
  251. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
  252. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  253. data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
  254. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
  255. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
  256. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  257. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
  258. data/sorbet/rbi/todo.rbi +0 -11
  259. data/sorbet/tapioca/config.yml +0 -13
  260. data/sorbet/tapioca/require.rb +0 -4
data/rbi/checkoff.rbi ADDED
@@ -0,0 +1,4529 @@
1
+ # typed: strong
2
+ class ENV
3
+ # _@param_ `key`
4
+ #
5
+ # _@param_ `default`
6
+ sig { params(key: String, default: Object).returns(T.nilable(T.any(String, Symbol))) }
7
+ def self.fetch(key, default = :none); end
8
+
9
+ # _@param_ `key`
10
+ sig { params(key: String).returns(T.nilable(Object)) }
11
+ def self.[](key); end
12
+
13
+ # _@param_ `key`
14
+ #
15
+ # _@param_ `value`
16
+ sig { params(key: String, value: T.nilable(Object)).returns(T.nilable(Object)) }
17
+ def self.[]=(key, value); end
18
+ end
19
+
20
+ module Bundler
21
+ # _@param_ `groups`
22
+ sig { params(groups: T::Array[Symbol]).void }
23
+ def self.require(*groups); end
24
+ end
25
+
26
+ module OpenSSL
27
+ module SSL
28
+ VERIFY_PEER = T.let(1, T.untyped)
29
+ VERIFY_NONE = T.let(0, T.untyped)
30
+ end
31
+ end
32
+
33
+ class Time
34
+ # _@param_ `time`
35
+ #
36
+ # _@param_ `now`
37
+ sig { params(time: String, now: T.nilable(Time)).returns(Time) }
38
+ def self.parse(time, now = nil); end
39
+
40
+ # https://ruby-doc.org/3.2.2/exts/date/Time.html#method-i-to_date#
41
+ sig { returns(Date) }
42
+ def to_date; end
43
+ end
44
+
45
+ class Date
46
+ # _@param_ `date`
47
+ #
48
+ # _@param_ `comp`
49
+ #
50
+ # _@param_ `state`
51
+ sig { params(date: String, comp: T::Boolean, state: Object).returns(Date) }
52
+ def self.parse(date = '-4712-01-01', comp = true, state = Date::ITALY); end
53
+
54
+ # _@param_ `start`
55
+ sig { params(start: Integer).returns(Date) }
56
+ def self.today(start = Date::ITALY); end
57
+ end
58
+
59
+ # Monkeypatches Asana::Resources::Resource so that Ruby marshalling and
60
+ # unmarshalling works on Asana resource classes. Currently, it will
61
+ # work unless you call an accessor method, which triggers Asana's
62
+ # client library Resource class' method_missing() to "cache" the
63
+ # result by creating a singleton method. Unfortunately, singleton
64
+ # methods break marshalling, which is not smart enough to know that it
65
+ # is not necessary to marshall them as they will simply be recreated
66
+ # when needed.
67
+ module Asana
68
+ include Asana::Resources
69
+
70
+ class Client
71
+ sig { returns(Asana::ProxiedResourceClasses::Task) }
72
+ def tasks; end
73
+
74
+ sig { returns(Asana::ProxiedResourceClasses::Workspace) }
75
+ def workspaces; end
76
+
77
+ sig { returns(Asana::ProxiedResourceClasses::Section) }
78
+ def sections; end
79
+
80
+ sig { returns(Asana::ProxiedResourceClasses::Project) }
81
+ def projects; end
82
+
83
+ sig { returns(Asana::ProxiedResourceClasses::UserTaskList) }
84
+ def user_task_lists; end
85
+
86
+ sig { returns(Asana::ProxiedResourceClasses::Portfolio) }
87
+ def portfolios; end
88
+
89
+ sig { returns(Asana::ProxiedResourceClasses::User) }
90
+ def users; end
91
+
92
+ sig { returns(Asana::ProxiedResourceClasses::CustomField) }
93
+ def custom_fields; end
94
+
95
+ sig { returns(Asana::ProxiedResourceClasses::Tag) }
96
+ def tags; end
97
+
98
+ # sord warn - Asana::HttpClient::Response wasn't able to be resolved to a constant in this project
99
+ # Public: Performs a GET request against an arbitrary Asana URL. Allows for
100
+ # the user to interact with the API in ways that haven't been
101
+ # reflected/foreseen in this library.
102
+ #
103
+ # _@param_ `url` — the URL to GET
104
+ #
105
+ # _@param_ `args` — the request I/O options
106
+ sig { params(url: String, args: Object).returns(Asana::HttpClient::Response) }
107
+ def get(url, **args); end
108
+ end
109
+
110
+ # Monkeypatches:
111
+ #
112
+ # https://github.com/Asana/ruby-asana/blob/master/lib/asana
113
+ module Resources
114
+ # https://developers.asana.com/reference/gettask
115
+ class Task
116
+ sig { returns(String) }
117
+ def resource_subtype; end
118
+
119
+ sig { returns(T.nilable(T::Boolean)) }
120
+ def is_rendered_as_separator; end
121
+
122
+ sig { returns(T.nilable(String)) }
123
+ def due_at; end
124
+
125
+ sig { returns(T.nilable(String)) }
126
+ def due_on; end
127
+
128
+ sig { returns(T.nilable(String)) }
129
+ def name; end
130
+
131
+ sig { returns(T.nilable(T::Hash[String, String])) }
132
+ def assignee; end
133
+
134
+ sig { returns(T.nilable(String)) }
135
+ def html_notes; end
136
+
137
+ sig { returns(T::Array[T::Hash[String, T::Hash[String, String]]]) }
138
+ def memberships; end
139
+
140
+ # _@param_ `client`
141
+ #
142
+ # _@param_ `assignee`
143
+ #
144
+ # _@param_ `workspace`
145
+ #
146
+ # _@param_ `name`
147
+ sig do
148
+ params(
149
+ client: Asana::Client,
150
+ assignee: String,
151
+ workspace: String,
152
+ name: String
153
+ ).returns(Asana::Resources::Task)
154
+ end
155
+ def self.create(client, assignee:, workspace:, name:); end
156
+ end
157
+
158
+ class Section
159
+ sig { returns(T.nilable(String)) }
160
+ def name; end
161
+ end
162
+
163
+ class Project
164
+ sig { returns(T.nilable(String)) }
165
+ def name; end
166
+
167
+ sig { returns(T.nilable(String)) }
168
+ def due_date; end
169
+ end
170
+
171
+ class Portfolio
172
+ # _@param_ `options` — the request I/O options
173
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(T::Enumerable[Asana::Resources::Project]) }
174
+ def get_items(options = {}); end
175
+ end
176
+
177
+ class Workspace
178
+ sig { returns(T.nilable(String)) }
179
+ def html_notes; end
180
+
181
+ # _@param_ `client`
182
+ #
183
+ # _@param_ `id`
184
+ #
185
+ # _@param_ `options`
186
+ sig { params(client: Asana::Client, id: String, options: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::Workspace) }
187
+ def self.find_by_id(client, id, options: {}); end
188
+ end
189
+
190
+ # Public: The base resource class which provides some sugar over common
191
+ # resource functionality.
192
+ class Resource
193
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
194
+ def marshal_dump; end
195
+
196
+ # _@param_ `data`
197
+ sig { params(data: T::Hash[T.untyped, T.untyped]).void }
198
+ def marshal_load(data); end
199
+ end
200
+ end
201
+
202
+ module Errors
203
+ class NotFound < Asana::Errors::APIError
204
+ end
205
+ end
206
+
207
+ module ProxiedResourceClasses
208
+ class CustomField
209
+ # sord warn - Asana::Resources::CustomField wasn't able to be resolved to a constant in this project
210
+ # Get a workspace's custom fields
211
+ #
212
+ # _@param_ `workspace_gid` — (required) Globally unique identifier for the workspace or organization.
213
+ #
214
+ # _@param_ `options` — the request I/O options
215
+ sig { params(workspace_gid: String, options: T::Hash[T.untyped, T.untyped]).returns(T::Enumerable[Asana::Resources::CustomField]) }
216
+ def get_custom_fields_for_workspace(workspace_gid: required("workspace_gid"), options: {}); end
217
+ end
218
+
219
+ class Task
220
+ # Get subtasks from a task
221
+ #
222
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
223
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
224
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
225
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
226
+ #
227
+ # _@param_ `task_gid` — (required) The task to operate on.
228
+ #
229
+ # _@param_ `options` — the request I/O options
230
+ sig { params(task_gid: String, options: T::Hash[T.untyped, T.untyped]).returns(T::Enumerable[Asana::Resources::Task]) }
231
+ def get_subtasks_for_task(task_gid: required("task_gid"), options: {}); end
232
+
233
+ # Returns the complete task record for a single task.
234
+ #
235
+ # _@param_ `id` — The task to get.
236
+ #
237
+ # _@param_ `options` — the request I/O options.
238
+ sig { params(id: String, options: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::Task) }
239
+ def find_by_id(id, options: {}); end
240
+
241
+ # Returns the compact task records for some filtered set of tasks. Use one
242
+ # or more of the parameters provided to filter the tasks returned. You must
243
+ # specify a `project`, `section`, `tag`, or `user_task_list` if you do not
244
+ # specify `assignee` and `workspace`.
245
+ #
246
+ # completed since this time.
247
+ #
248
+ # Notes:
249
+ #
250
+ # If you specify `assignee`, you must also specify the `workspace` to filter on.
251
+ #
252
+ # If you specify `workspace`, you must also specify the `assignee` to filter on.
253
+ #
254
+ # Currently, this is only supported in board views.
255
+ #
256
+ # A task is considered "modified" if any of its properties change,
257
+ # or associations between it and other objects are modified (e.g.
258
+ # a task being added to a project). A task is not considered modified
259
+ # just because another object it is associated with (e.g. a subtask)
260
+ # is modified. Actions that count as modifying the task include
261
+ # assigning, renaming, completing, and adding stories.
262
+ #
263
+ # _@param_ `assignee` — The assignee to filter tasks on.
264
+ #
265
+ # _@param_ `workspace` — The workspace or organization to filter tasks on.
266
+ #
267
+ # _@param_ `project` — The project to filter tasks on.
268
+ #
269
+ # _@param_ `section` — The section to filter tasks on.
270
+ #
271
+ # _@param_ `tag` — The tag to filter tasks on.
272
+ #
273
+ # _@param_ `user_task_list` — The user task list to filter tasks on.
274
+ #
275
+ # _@param_ `completed_since` — Only return tasks that are either incomplete or that have been
276
+ #
277
+ # _@param_ `modified_since` — Only return tasks that have been modified since the given time.
278
+ #
279
+ # _@param_ `per_page` — the number of records to fetch per page.
280
+ #
281
+ # _@param_ `options` — the request I/O options.
282
+ sig do
283
+ params(
284
+ assignee: T.nilable(String),
285
+ workspace: T.nilable(String),
286
+ project: T.nilable(String),
287
+ section: T.nilable(String),
288
+ tag: T.nilable(String),
289
+ user_task_list: T.nilable(String),
290
+ completed_since: T.nilable(String),
291
+ modified_since: T.nilable(String),
292
+ per_page: Integer,
293
+ options: T::Hash[T.untyped, T.untyped]
294
+ ).returns(T::Enumerable[Asana::Resources::Task])
295
+ end
296
+ def find_all(assignee: nil, workspace: nil, project: nil, section: nil, tag: nil, user_task_list: nil, completed_since: nil, modified_since: nil, per_page: 20, options: {}); end
297
+
298
+ # _@param_ `assignee`
299
+ #
300
+ # _@param_ `project`
301
+ #
302
+ # _@param_ `section`
303
+ #
304
+ # _@param_ `workspace`
305
+ #
306
+ # _@param_ `completed_since`
307
+ #
308
+ # _@param_ `per_page`
309
+ #
310
+ # _@param_ `modified_since`
311
+ #
312
+ # _@param_ `section`
313
+ #
314
+ # _@param_ `options` — the request I/O options.
315
+ sig do
316
+ params(
317
+ assignee: T.nilable(String),
318
+ project: T.nilable(String),
319
+ section: T.nilable(String),
320
+ workspace: T.nilable(String),
321
+ completed_since: T.nilable(Time),
322
+ per_page: Integer,
323
+ modified_since: T.nilable(Time),
324
+ options: T::Hash[T.untyped, T.untyped]
325
+ ).returns(T::Enumerable[Asana::Resources::Task])
326
+ end
327
+ def get_tasks(assignee: nil, project: nil, section: nil, workspace: nil, completed_since: nil, per_page: 20, modified_since: nil, options: {}); end
328
+ end
329
+
330
+ class Workspace
331
+ sig { returns(T::Enumerable[Asana::Resources::Workspace]) }
332
+ def find_all; end
333
+ end
334
+
335
+ class Section
336
+ # _@param_ `project_gid`
337
+ #
338
+ # _@param_ `options`
339
+ sig { params(project_gid: String, options: T::Hash[T.untyped, T.untyped]).returns(T::Enumerable[Asana::Resources::Section]) }
340
+ def get_sections_for_project(project_gid:, options: {}); end
341
+
342
+ # Returns the complete record for a single section.
343
+ #
344
+ # _@param_ `id` — - The section to get.
345
+ #
346
+ # _@param_ `options` — - the request I/O options.
347
+ sig { params(id: String, options: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::Section) }
348
+ def find_by_id(id, options: {}); end
349
+ end
350
+
351
+ class Project
352
+ # Returns the compact project records for all projects in the workspace.
353
+ #
354
+ # Filters results to include only template projects.
355
+ #
356
+ # this parameter.
357
+ #
358
+ # _@param_ `workspace` — The workspace or organization to find projects in.
359
+ #
360
+ # _@param_ `is_template` — **Note: This parameter can only be included if a team is also defined, or the workspace is not an organization**
361
+ #
362
+ # _@param_ `archived` — Only return projects whose `archived` field takes on the value of
363
+ #
364
+ # _@param_ `per_page` — the number of records to fetch per page.
365
+ #
366
+ # _@param_ `options` — the request I/O options.
367
+ sig do
368
+ params(
369
+ workspace: String,
370
+ is_template: T.nilable(T::Boolean),
371
+ archived: T.nilable(T::Boolean),
372
+ per_page: Integer,
373
+ options: T::Hash[T.untyped, T.untyped]
374
+ ).returns(T::Enumerable[Asana::Resources::Project])
375
+ end
376
+ def find_by_workspace(workspace: required("workspace"), is_template: nil, archived: nil, per_page: 20, options: {}); end
377
+
378
+ # Returns the complete project record for a single project.
379
+ #
380
+ # _@param_ `id` — The project to get.
381
+ #
382
+ # _@param_ `options` — the request I/O options.
383
+ sig { params(id: String, options: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::Project) }
384
+ def find_by_id(id, options: {}); end
385
+ end
386
+
387
+ class UserTaskList
388
+ # sord warn - Asana::Resources::UserTaskList wasn't able to be resolved to a constant in this project
389
+ # _@param_ `user_gid` — (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
390
+ #
391
+ # _@param_ `workspace` — (required) The workspace in which to get the user task list.
392
+ #
393
+ # _@param_ `options` — the request I/O options
394
+ sig { params(user_gid: String, workspace: T.nilable(String), options: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::UserTaskList) }
395
+ def get_user_task_list_for_user(user_gid:, workspace: nil, options: {}); end
396
+ end
397
+
398
+ class Portfolio
399
+ # Returns a list of the portfolios in compact representation that are owned
400
+ # by the current API user.
401
+ #
402
+ # list of portfolios that they themselves own.
403
+ #
404
+ # _@param_ `workspace` — The workspace or organization to filter portfolios on.
405
+ #
406
+ # _@param_ `owner` — The user who owns the portfolio. Currently, API users can only get a
407
+ #
408
+ # _@param_ `per_page` — the number of records to fetch per page.
409
+ #
410
+ # _@param_ `options` — the request I/O options.
411
+ sig do
412
+ params(
413
+ workspace: String,
414
+ owner: String,
415
+ per_page: Integer,
416
+ options: T::Hash[T.untyped, T.untyped]
417
+ ).returns(T::Enumerable[Asana::Resources::Portfolio])
418
+ end
419
+ def find_all(workspace: required("workspace"), owner: required("owner"), per_page: 20, options: {}); end
420
+
421
+ sig { params(id: T.untyped, options: T.untyped).returns(T.nilable(Asana::Resources::Portfolio)) }
422
+ def find_by_id(id, options: {}); end
423
+
424
+ # Get portfolio items
425
+ #
426
+ # _@param_ `portfolio_gid` — (required) Globally unique identifier for the portfolio.
427
+ #
428
+ # _@param_ `options` — the request I/O options
429
+ sig { params(portfolio_gid: String, options: T::Hash[T.untyped, T.untyped]).returns(T::Enumerable[Asana::Resources::Project]) }
430
+ def get_items_for_portfolio(portfolio_gid: required("portfolio_gid"), options: {}); end
431
+ end
432
+
433
+ class User
434
+ # sord warn - Asana::Resources::User wasn't able to be resolved to a constant in this project
435
+ # Returns the full user record for the currently authenticated user.
436
+ #
437
+ # _@param_ `options` — the request I/O options.
438
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::User) }
439
+ def me(options: {}); end
440
+ end
441
+
442
+ class Tag
443
+ # sord warn - Asana::Resources::Tag wasn't able to be resolved to a constant in this project
444
+ # Get tags in a workspace
445
+ #
446
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
447
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
448
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
449
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
450
+ #
451
+ # _@param_ `workspace_gid` — (required) Globally unique identifier for the workspace or organization.
452
+ #
453
+ # _@param_ `options` — the request I/O options
454
+ sig { params(workspace_gid: String, options: T::Hash[T.untyped, T.untyped]).returns(T::Enumerable[Asana::Resources::Tag]) }
455
+ def get_tags_for_workspace(workspace_gid:, options: {}); end
456
+ end
457
+ end
458
+ end
459
+
460
+ # Command-line and gem client for Asana (unofficial)
461
+ module Checkoff
462
+ VERSION = T.let('0.225.0', T.untyped)
463
+
464
+ # Move tasks from one place to another
465
+ class MvSubcommand
466
+ sig { params(from_workspace_arg: T.untyped, from_project_arg: T.untyped, from_section_arg: T.untyped).returns(T.untyped) }
467
+ def validate_and_assign_from_location(from_workspace_arg, from_project_arg, from_section_arg); end
468
+
469
+ sig { params(to_project_arg: T.untyped).returns(T.untyped) }
470
+ def create_to_project_name(to_project_arg); end
471
+
472
+ sig { params(to_section_arg: T.untyped).returns(T.untyped) }
473
+ def create_to_section_name(to_section_arg); end
474
+
475
+ sig { params(to_workspace_arg: T.untyped, to_project_arg: T.untyped, to_section_arg: T.untyped).returns(T.untyped) }
476
+ def validate_and_assign_to_location(to_workspace_arg, to_project_arg, to_section_arg); end
477
+
478
+ sig do
479
+ params(
480
+ from_workspace_arg: T.untyped,
481
+ from_project_arg: T.untyped,
482
+ from_section_arg: T.untyped,
483
+ to_workspace_arg: T.untyped,
484
+ to_project_arg: T.untyped,
485
+ to_section_arg: T.untyped,
486
+ config: T.untyped,
487
+ projects: T.untyped,
488
+ sections: T.untyped,
489
+ logger: T.untyped
490
+ ).void
491
+ end
492
+ def initialize(from_workspace_arg:, from_project_arg:, from_section_arg:, to_workspace_arg:, to_project_arg:, to_section_arg:, config: Checkoff::Internal::ConfigLoader.load(:asana), projects: Checkoff::Projects.new(config: config), sections: Checkoff::Sections.new(config: config), logger: $stderr); end
493
+
494
+ sig { params(tasks: T.untyped, to_project: T.untyped, to_section: T.untyped).returns(T.untyped) }
495
+ def move_tasks(tasks, to_project, to_section); end
496
+
497
+ sig { params(from_workspace_name: T.untyped, from_project_name: T.untyped, from_section_name: T.untyped).returns(T.untyped) }
498
+ def fetch_tasks(from_workspace_name, from_project_name, from_section_name); end
499
+
500
+ sig { returns(T.untyped) }
501
+ def run; end
502
+
503
+ sig { params(project_arg: T.untyped).returns(T.untyped) }
504
+ def project_arg_to_name(project_arg); end
505
+
506
+ # Returns the value of attribute from_workspace_name.
507
+ sig { returns(T.untyped) }
508
+ attr_reader :from_workspace_name
509
+
510
+ # Returns the value of attribute from_project_name.
511
+ sig { returns(T.untyped) }
512
+ attr_reader :from_project_name
513
+
514
+ # Returns the value of attribute from_section_name.
515
+ sig { returns(T.untyped) }
516
+ attr_reader :from_section_name
517
+
518
+ # Returns the value of attribute to_workspace_name.
519
+ sig { returns(T.untyped) }
520
+ attr_reader :to_workspace_name
521
+
522
+ # Returns the value of attribute to_project_name.
523
+ sig { returns(T.untyped) }
524
+ attr_reader :to_project_name
525
+
526
+ # Returns the value of attribute to_section_name.
527
+ sig { returns(T.untyped) }
528
+ attr_reader :to_section_name
529
+
530
+ # Returns the value of attribute projects.
531
+ sig { returns(T.untyped) }
532
+ attr_reader :projects
533
+
534
+ # Returns the value of attribute sections.
535
+ sig { returns(T.untyped) }
536
+ attr_reader :sections
537
+ end
538
+
539
+ # CLI subcommand that shows tasks in JSON form
540
+ class ViewSubcommand
541
+ sig do
542
+ params(
543
+ workspace_name: T.untyped,
544
+ project_name: T.untyped,
545
+ section_name: T.untyped,
546
+ task_name: T.untyped,
547
+ config: T.untyped,
548
+ projects: T.untyped,
549
+ sections: T.untyped,
550
+ tasks: T.untyped,
551
+ stderr: T.untyped
552
+ ).void
553
+ end
554
+ def initialize(workspace_name, project_name, section_name, task_name, config: Checkoff::Internal::ConfigLoader.load(:asana), projects: Checkoff::Projects.new(config: config), sections: Checkoff::Sections.new(config: config,
555
+ projects: projects), tasks: Checkoff::Tasks.new(config: config,
556
+ sections: sections), stderr: $stderr); end
557
+
558
+ sig { returns(T.untyped) }
559
+ def run; end
560
+
561
+ sig { params(project_name: T.untyped).returns(T.untyped) }
562
+ def validate_and_assign_project_name(project_name); end
563
+
564
+ sig { params(workspace: T.untyped, project: T.untyped).returns(T.untyped) }
565
+ def run_on_project(workspace, project); end
566
+
567
+ sig { params(workspace: T.untyped, project: T.untyped, section: T.untyped).returns(T.untyped) }
568
+ def run_on_section(workspace, project, section); end
569
+
570
+ sig do
571
+ params(
572
+ workspace: T.untyped,
573
+ project: T.untyped,
574
+ section: T.untyped,
575
+ task_name: T.untyped
576
+ ).returns(T.untyped)
577
+ end
578
+ def run_on_task(workspace, project, section, task_name); end
579
+
580
+ sig { params(task: T.untyped).returns(T.untyped) }
581
+ def task_to_hash(task); end
582
+
583
+ sig { params(tasks: T.untyped).returns(T.untyped) }
584
+ def tasks_to_hash(tasks); end
585
+
586
+ # Returns the value of attribute workspace_name.
587
+ sig { returns(T.untyped) }
588
+ attr_reader :workspace_name
589
+
590
+ # Returns the value of attribute project_name.
591
+ sig { returns(T.untyped) }
592
+ attr_reader :project_name
593
+
594
+ # Returns the value of attribute section_name.
595
+ sig { returns(T.untyped) }
596
+ attr_reader :section_name
597
+
598
+ # Returns the value of attribute task_name.
599
+ sig { returns(T.untyped) }
600
+ attr_reader :task_name
601
+
602
+ # Returns the value of attribute sections.
603
+ sig { returns(T.untyped) }
604
+ attr_reader :sections
605
+
606
+ # Returns the value of attribute tasks.
607
+ sig { returns(T.untyped) }
608
+ attr_reader :tasks
609
+
610
+ # Returns the value of attribute stderr.
611
+ sig { returns(T.untyped) }
612
+ attr_reader :stderr
613
+ end
614
+
615
+ # CLI subcommand that creates a task
616
+ class QuickaddSubcommand
617
+ sig do
618
+ params(
619
+ workspace_name: T.untyped,
620
+ task_name: T.untyped,
621
+ config: T.untyped,
622
+ workspaces: T.untyped,
623
+ tasks: T.untyped
624
+ ).void
625
+ end
626
+ def initialize(workspace_name, task_name, config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), tasks: Checkoff::Tasks.new(config: config)); end
627
+
628
+ sig { returns(T.untyped) }
629
+ def run; end
630
+
631
+ # Returns the value of attribute workspace_name.
632
+ sig { returns(T.untyped) }
633
+ attr_reader :workspace_name
634
+
635
+ # Returns the value of attribute task_name.
636
+ sig { returns(T.untyped) }
637
+ attr_reader :task_name
638
+ end
639
+
640
+ # Provide ability for CLI to pull Asana items
641
+ class CheckoffGLIApp
642
+ extend GLI::App
643
+ end
644
+
645
+ # Work with tags in Asana
646
+ class Tags
647
+ extend CacheMethod::ClassMethods
648
+ MINUTE = T.let(60, T.untyped)
649
+ HOUR = T.let(T.let(MINUTE * 60, Numeric), T.untyped)
650
+ DAY = T.let(T.let(24 * HOUR, Numeric), T.untyped)
651
+ REALLY_LONG_CACHE_TIME = T.let(T.let(HOUR * 1, Numeric), T.untyped)
652
+ LONG_CACHE_TIME = T.let(T.let(MINUTE * 15, Numeric), T.untyped)
653
+ SHORT_CACHE_TIME = T.let(T.let(MINUTE, Numeric), T.untyped)
654
+
655
+ # _@param_ `config`
656
+ #
657
+ # _@param_ `clients`
658
+ #
659
+ # _@param_ `client`
660
+ #
661
+ # _@param_ `projects`
662
+ #
663
+ # _@param_ `workspaces`
664
+ sig do
665
+ params(
666
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
667
+ clients: Checkoff::Clients,
668
+ client: Asana::Client,
669
+ projects: Checkoff::Projects,
670
+ workspaces: Checkoff::Workspaces
671
+ ).void
672
+ end
673
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), clients: Checkoff::Clients.new(config: config), client: clients.client, projects: Checkoff::Projects.new(config: config, client: client), workspaces: Checkoff::Workspaces.new(config: config, client: client)); end
674
+
675
+ # _@param_ `workspace_name`
676
+ #
677
+ # _@param_ `tag_name`
678
+ #
679
+ # _@param_ `only_uncompleted`
680
+ #
681
+ # _@param_ `extra_fields`
682
+ sig do
683
+ params(
684
+ workspace_name: String,
685
+ tag_name: String,
686
+ only_uncompleted: T::Boolean,
687
+ extra_fields: T::Array[String]
688
+ ).returns(T::Enumerable[Asana::Resources::Task])
689
+ end
690
+ def tasks(workspace_name, tag_name, only_uncompleted: true, extra_fields: []); end
691
+
692
+ # sord warn - Asana::Resources::Tag wasn't able to be resolved to a constant in this project
693
+ # _@param_ `workspace_name`
694
+ #
695
+ # _@param_ `tag_name`
696
+ sig { params(workspace_name: String, tag_name: String).returns(Asana::Resources::Tag) }
697
+ def tag_or_raise(workspace_name, tag_name); end
698
+
699
+ # sord warn - Asana::Resources::Tag wasn't able to be resolved to a constant in this project
700
+ # @sg-ignore
701
+ #
702
+ # _@param_ `workspace_name`
703
+ #
704
+ # _@param_ `tag_name`
705
+ sig { params(workspace_name: String, tag_name: String).returns(T.nilable(Asana::Resources::Tag)) }
706
+ def tag(workspace_name, tag_name); end
707
+
708
+ # @sg-ignore
709
+ #
710
+ # _@param_ `options`
711
+ sig { params(options: T::Hash[Symbol, Object]).returns(T::Hash[Symbol, Object]) }
712
+ def build_params(options); end
713
+
714
+ # sord warn - Asana::HttpClient::Response wasn't able to be resolved to a constant in this project
715
+ # https://github.com/Asana/ruby-asana/blob/master/lib/asana/resource_includes/response_helper.rb#L7
716
+ #
717
+ # _@param_ `response`
718
+ sig { params(response: Asana::HttpClient::Response).returns(T::Array[T.any(T::Hash[T.untyped, T.untyped], T::Hash[T.untyped, T.untyped])]) }
719
+ def parse(response); end
720
+
721
+ sig { void }
722
+ def self.run; end
723
+
724
+ # _@param_ `workspace_name`
725
+ #
726
+ # _@param_ `tag_gid`
727
+ #
728
+ # _@param_ `only_uncompleted`
729
+ #
730
+ # _@param_ `extra_fields`
731
+ sig do
732
+ params(
733
+ workspace_name: String,
734
+ tag_gid: String,
735
+ only_uncompleted: T::Boolean,
736
+ extra_fields: T::Array[String]
737
+ ).returns(T::Enumerable[Asana::Resources::Task])
738
+ end
739
+ def tasks_by_tag_gid(workspace_name, tag_gid, only_uncompleted: true, extra_fields: []); end
740
+
741
+ sig { returns(Checkoff::Workspaces) }
742
+ attr_reader :workspaces
743
+
744
+ sig { returns(Checkoff::Projects) }
745
+ attr_reader :projects
746
+
747
+ sig { returns(Asana::Client) }
748
+ attr_reader :client
749
+ end
750
+
751
+ # Pull tasks from Asana
752
+ class Tasks
753
+ include Logging
754
+ extend T::Sig
755
+ MINUTE = T.let(60, T.untyped)
756
+ HOUR = T.let(MINUTE * 60, T.untyped)
757
+ DAY = T.let(24 * HOUR, T.untyped)
758
+ REALLY_LONG_CACHE_TIME = T.let(MINUTE * 30, T.untyped)
759
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
760
+ SHORT_CACHE_TIME = T.let(MINUTE * 5, T.untyped)
761
+
762
+ # _@param_ `config`
763
+ #
764
+ # _@param_ `client`
765
+ #
766
+ # _@param_ `workspaces`
767
+ #
768
+ # _@param_ `sections`
769
+ #
770
+ # _@param_ `portfolios`
771
+ #
772
+ # _@param_ `custom_fields`
773
+ #
774
+ # _@param_ `time_class`
775
+ #
776
+ # _@param_ `date_class`
777
+ #
778
+ # _@param_ `asana_task`
779
+ sig do
780
+ params(
781
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
782
+ client: Asana::Client,
783
+ workspaces: Checkoff::Workspaces,
784
+ sections: Checkoff::Sections,
785
+ portfolios: Checkoff::Portfolios,
786
+ custom_fields: Checkoff::CustomFields,
787
+ time_class: T.class_of(Time),
788
+ date_class: T.class_of(Date),
789
+ asana_task: T.class_of(Asana::Resources::Task)
790
+ ).void
791
+ end
792
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), client: Checkoff::Clients.new(config: config).client, workspaces: Checkoff::Workspaces.new(config: config,
793
+ client: client), sections: Checkoff::Sections.new(config: config,
794
+ client: client), portfolios: Checkoff::Portfolios.new(config: config,
795
+ client: client), custom_fields: Checkoff::CustomFields.new(config: config,
796
+ client: client), time_class: Time, date_class: Date, asana_task: Asana::Resources::Task); end
797
+
798
+ # Indicates a task is ready for a person to work on it. This is
799
+ # subtly different than what is used by Asana to mark a date as
800
+ # red/green! A task is ready if it is not dependent on an
801
+ # incomplete task and one of these is true:
802
+ #
803
+ # * start is null and due on is today
804
+ # * start is null and due at is before now
805
+ # * start on is today
806
+ # * start at is before now
807
+ #
808
+ # _@param_ `task`
809
+ #
810
+ # _@param_ `period` — - :now_or_before or :this_week
811
+ #
812
+ # _@param_ `ignore_dependencies`
813
+ sig { params(task: Asana::Resources::Task, period: Symbol, ignore_dependencies: T::Boolean).returns(T::Boolean) }
814
+ def task_ready?(task, period: :now_or_before, ignore_dependencies: false); end
815
+
816
+ # _@param_ `task`
817
+ #
818
+ # _@param_ `field_name`
819
+ #
820
+ # _@param_ `period` — :now_or_before, :this_week - See Checkoff::Timing#in_period?_
821
+ sig { params(task: Asana::Resources::Task, field_name: T.any(Symbol, T::Array[T.untyped]), period: T.any(Symbol, T::Array[T.untyped])).returns(T::Boolean) }
822
+ def in_period?(task, field_name, period); end
823
+
824
+ # _@param_ `task`
825
+ #
826
+ # _@param_ `field_name` — :start - start_at or start_on (first set) :due - due_at or due_on (first set) :ready - start_at or start_on or due_at or due_on (first set) :modified - modified_at [:custom_field, "foo"] - 'Date' custom field type named 'foo'
827
+ sig { params(task: Asana::Resources::Task, field_name: T.any(Symbol, T::Array[T.untyped])).returns(T.nilable(T.any(Date, Time))) }
828
+ def date_or_time_field_by_name(task, field_name); end
829
+
830
+ # Pull a specific task by name
831
+ #
832
+ # @sg-ignore
833
+ #
834
+ # _@param_ `workspace_name`
835
+ #
836
+ # _@param_ `project_name`
837
+ #
838
+ # _@param_ `section_name`
839
+ #
840
+ # _@param_ `task_name`
841
+ #
842
+ # _@param_ `only_uncompleted`
843
+ #
844
+ # _@param_ `extra_fields`
845
+ sig do
846
+ params(
847
+ workspace_name: String,
848
+ project_name: T.any(String, Symbol),
849
+ task_name: String,
850
+ section_name: T.nilable(T.any(String, Symbol)),
851
+ only_uncompleted: T::Boolean,
852
+ extra_fields: T::Array[String]
853
+ ).returns(T.nilable(Asana::Resources::Task))
854
+ end
855
+ def task(workspace_name, project_name, task_name, section_name: :unspecified, only_uncompleted: true, extra_fields: []); end
856
+
857
+ # @sg-ignore
858
+ #
859
+ # _@param_ `workspace_name`
860
+ #
861
+ # _@param_ `project_name`
862
+ #
863
+ # _@param_ `section_name`
864
+ #
865
+ # _@param_ `task_name`
866
+ sig do
867
+ params(
868
+ workspace_name: String,
869
+ project_name: T.any(String, Symbol),
870
+ section_name: T.nilable(T.any(String, Symbol)),
871
+ task_name: String
872
+ ).returns(T.nilable(String))
873
+ end
874
+ def gid_for_task(workspace_name, project_name, section_name, task_name); end
875
+
876
+ # Pull a specific task by GID
877
+ #
878
+ # _@param_ `task_gid`
879
+ #
880
+ # _@param_ `extra_fields`
881
+ #
882
+ # _@param_ `only_uncompleted`
883
+ sig { params(task_gid: String, extra_fields: T::Array[String], only_uncompleted: T::Boolean).returns(T.nilable(Asana::Resources::Task)) }
884
+ def task_by_gid(task_gid, extra_fields: [], only_uncompleted: true); end
885
+
886
+ # Add a task
887
+ #
888
+ # _@param_ `name`
889
+ #
890
+ # _@param_ `workspace_gid`
891
+ #
892
+ # _@param_ `assignee_gid`
893
+ sig { params(name: String, workspace_gid: String, assignee_gid: String).returns(Asana::Resources::Task) }
894
+ def add_task(name, workspace_gid: @workspaces.default_workspace_gid, assignee_gid: default_assignee_gid); end
895
+
896
+ # Return user-accessible URL for a task
897
+ #
898
+ # _@param_ `task`
899
+ #
900
+ # _@return_ — end-user URL to the task in question
901
+ sig { params(task: Asana::Resources::Task).returns(String) }
902
+ def url_of_task(task); end
903
+
904
+ # True if any of the task's dependencies are marked incomplete
905
+ #
906
+ # Include 'dependencies.gid' in extra_fields of task passed in.
907
+ #
908
+ # _@param_ `task`
909
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
910
+ def incomplete_dependencies?(task); end
911
+
912
+ # _@param_ `task`
913
+ #
914
+ # _@param_ `extra_task_fields`
915
+ sig { params(task: Asana::Resources::Task, extra_task_fields: T::Array[String]).returns(T::Array[Asana::Resources::Task]) }
916
+ def all_dependent_tasks(task, extra_task_fields: []); end
917
+
918
+ # Builds on the standard API representation of an Asana task with some
919
+ # convenience keys:
920
+ #
921
+ # <regular keys from API response>
922
+ # +
923
+ # unwrapped:
924
+ # membership_by_section_gid: Hash<String, Hash (membership)>
925
+ # membership_by_project_gid: Hash<String, Hash (membership)>
926
+ # membership_by_project_name: Hash<String, Hash (membership)>
927
+ # task: String (name)
928
+ #
929
+ # _@param_ `task`
930
+ sig { params(task: Asana::Resources::Task).returns(T::Hash[T.untyped, T.untyped]) }
931
+ def task_to_h(task); end
932
+
933
+ # _@param_ `task_data`
934
+ sig { params(task_data: T::Hash[T.untyped, T.untyped]).returns(Asana::Resources::Task) }
935
+ def h_to_task(task_data); end
936
+
937
+ # True if the task is in a project which is in the given portfolio
938
+ #
939
+ # _@param_ `task`
940
+ #
941
+ # _@param_ `portfolio_name`
942
+ #
943
+ # _@param_ `workspace_name`
944
+ sig { params(task: Asana::Resources::Task, portfolio_name: String, workspace_name: String).returns(T::Boolean) }
945
+ def in_portfolio_named?(task, portfolio_name, workspace_name: @workspaces.default_workspace.name); end
946
+
947
+ # True if the task is in a project which is in the given portfolio
948
+ #
949
+ # _@param_ `task`
950
+ #
951
+ # _@param_ `portfolio_name`
952
+ #
953
+ # _@param_ `workspace_name`
954
+ sig { params(task: Asana::Resources::Task, portfolio_name: String, workspace_name: String).returns(T::Boolean) }
955
+ def in_portfolio_more_than_once?(task, portfolio_name, workspace_name: @workspaces.default_workspace.name); end
956
+
957
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
958
+ def as_cache_key; end
959
+
960
+ sig { returns(Checkoff::Internal::TaskTiming) }
961
+ def task_timing; end
962
+
963
+ sig { returns(Checkoff::Internal::TaskHashes) }
964
+ def task_hashes; end
965
+
966
+ # _@param_ `workspace_name`
967
+ #
968
+ # _@param_ `project_name`
969
+ #
970
+ # _@param_ `section_name` — - :unspecified
971
+ #
972
+ # _@param_ `only_uncompleted`
973
+ #
974
+ # _@param_ `extra_fields`
975
+ sig do
976
+ params(
977
+ workspace_name: String,
978
+ project_name: T.any(String, Symbol),
979
+ only_uncompleted: T::Boolean,
980
+ extra_fields: T::Array[String],
981
+ section_name: T.nilable(T.any(String, Symbol))
982
+ ).returns(T::Enumerable[Asana::Resources::Task])
983
+ end
984
+ def tasks(workspace_name, project_name, only_uncompleted:, extra_fields: [], section_name: :unspecified); end
985
+
986
+ sig { returns(Checkoff::Projects) }
987
+ def projects; end
988
+
989
+ # @sg-ignore
990
+ sig { returns(String) }
991
+ def default_assignee_gid; end
992
+
993
+ sig { returns(::Logger) }
994
+ def logger; end
995
+
996
+ # _@param_ `message`
997
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
998
+ def error(message = nil, &block); end
999
+
1000
+ # _@param_ `message`
1001
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1002
+ def warn(message = nil, &block); end
1003
+
1004
+ # _@param_ `message`
1005
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1006
+ def info(message = nil, &block); end
1007
+
1008
+ # _@param_ `message`
1009
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1010
+ def debug(message = nil, &block); end
1011
+
1012
+ # _@param_ `message`
1013
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1014
+ def finer(message = nil, &block); end
1015
+
1016
+ # @sg-ignore
1017
+ sig { returns(Symbol) }
1018
+ def log_level; end
1019
+
1020
+ sig { returns(Asana::Client) }
1021
+ attr_reader :client
1022
+
1023
+ sig { returns(Checkoff::Timing) }
1024
+ attr_reader :timing
1025
+
1026
+ sig { returns(Checkoff::CustomFields) }
1027
+ attr_reader :custom_fields
1028
+ end
1029
+
1030
+ # Methods related to the Asana events / webhooks APIs
1031
+ class Events
1032
+ include Logging
1033
+ extend CacheMethod::ClassMethods
1034
+ MINUTE = T.let(60, T.untyped)
1035
+ HOUR = T.let(MINUTE * 60, T.untyped)
1036
+ DAY = T.let(24 * HOUR, T.untyped)
1037
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
1038
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1039
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
1040
+
1041
+ # _@param_ `config`
1042
+ #
1043
+ # _@param_ `workspaces`
1044
+ #
1045
+ # _@param_ `tasks`
1046
+ #
1047
+ # _@param_ `sections`
1048
+ #
1049
+ # _@param_ `projects`
1050
+ #
1051
+ # _@param_ `clients`
1052
+ #
1053
+ # _@param_ `client`
1054
+ #
1055
+ # _@param_ `asana_event_filter_class`
1056
+ #
1057
+ # _@param_ `asana_event_enrichment`
1058
+ sig do
1059
+ params(
1060
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
1061
+ workspaces: Checkoff::Workspaces,
1062
+ tasks: Checkoff::Tasks,
1063
+ sections: Checkoff::Sections,
1064
+ projects: Checkoff::Projects,
1065
+ clients: Checkoff::Clients,
1066
+ client: Asana::Client,
1067
+ asana_event_filter_class: T.class_of(Checkoff::Internal::AsanaEventFilter),
1068
+ asana_event_enrichment: Checkoff::Internal::AsanaEventEnrichment
1069
+ ).void
1070
+ end
1071
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), tasks: Checkoff::Tasks.new(config: config), sections: Checkoff::Sections.new(config: config), projects: Checkoff::Projects.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client, asana_event_filter_class: Checkoff::Internal::AsanaEventFilter, asana_event_enrichment: Checkoff::Internal::AsanaEventEnrichment.new); end
1072
+
1073
+ # _@param_ `filters` — The filters to match against
1074
+ #
1075
+ # _@param_ `asana_events` — The events that Asana sent
1076
+ #
1077
+ # _@return_ — The events that should be acted on
1078
+ sig { params(filters: T.nilable(T::Array[T::Hash[T.untyped, T.untyped]]), asana_events: T::Array[T::Hash[T.untyped, T.untyped]]).returns(T::Array[T::Hash[T.untyped, T.untyped]]) }
1079
+ def filter_asana_events(filters, asana_events); end
1080
+
1081
+ # Add useful info (like resource task names) into an event for
1082
+ # human consumption
1083
+ #
1084
+ # _@param_ `asana_event`
1085
+ sig { params(asana_event: T::Hash[T.untyped, T.untyped]).returns(T::Hash[T.untyped, T.untyped]) }
1086
+ def enrich_event(asana_event); end
1087
+
1088
+ # sord warn - "[String" does not appear to be a type
1089
+ # sord warn - "Array<String>]" does not appear to be a type
1090
+ # sord warn - Invalid hash, must have exactly two types: "Hash<String,[String,Array<String>]>".
1091
+ # sord warn - "[String" does not appear to be a type
1092
+ # sord warn - "Array<String>]" does not appear to be a type
1093
+ # sord warn - Invalid hash, must have exactly two types: "Hash<String,[String,Array<String>]>".
1094
+ # _@param_ `filter`
1095
+ sig { params(filter: T.untyped).returns(T.untyped) }
1096
+ def enrich_filter(filter); end
1097
+
1098
+ # _@param_ `webhook_subscription` — Hash of the request made to webhook POST endpoint - https://app.asana.com/api/1.0/webhooks https://developers.asana.com/reference/createwebhook
1099
+ sig { params(webhook_subscription: T::Hash[T.untyped, T.untyped]).void }
1100
+ def enrich_webhook_subscription!(webhook_subscription); end
1101
+
1102
+ sig { void }
1103
+ def self.run; end
1104
+
1105
+ sig { returns(::Logger) }
1106
+ def logger; end
1107
+
1108
+ # _@param_ `message`
1109
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1110
+ def error(message = nil, &block); end
1111
+
1112
+ # _@param_ `message`
1113
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1114
+ def warn(message = nil, &block); end
1115
+
1116
+ # _@param_ `message`
1117
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1118
+ def info(message = nil, &block); end
1119
+
1120
+ # _@param_ `message`
1121
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1122
+ def debug(message = nil, &block); end
1123
+
1124
+ # _@param_ `message`
1125
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1126
+ def finer(message = nil, &block); end
1127
+
1128
+ # @sg-ignore
1129
+ sig { returns(Symbol) }
1130
+ def log_level; end
1131
+
1132
+ sig { returns(Checkoff::Projects) }
1133
+ attr_reader :projects
1134
+
1135
+ sig { returns(Checkoff::Sections) }
1136
+ attr_reader :sections
1137
+
1138
+ sig { returns(Checkoff::Tasks) }
1139
+ attr_reader :tasks
1140
+
1141
+ sig { returns(Checkoff::Workspaces) }
1142
+ attr_reader :workspaces
1143
+
1144
+ sig { returns(Asana::Client) }
1145
+ attr_reader :client
1146
+
1147
+ sig { returns(Checkoff::Internal::AsanaEventEnrichment) }
1148
+ attr_reader :asana_event_enrichment
1149
+ end
1150
+
1151
+ # Common vocabulary for managing time and time periods
1152
+ class Timing
1153
+ include Logging
1154
+ MINUTE = T.let(60, T.untyped)
1155
+ HOUR = T.let(MINUTE * 60, T.untyped)
1156
+ DAY = T.let(24 * HOUR, T.untyped)
1157
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
1158
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1159
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
1160
+ WDAY_FROM_DAY_OF_WEEK = T.let({
1161
+ monday: 1,
1162
+ tuesday: 2,
1163
+ wednesday: 3,
1164
+ thursday: 4,
1165
+ friday: 5,
1166
+ saturday: 6,
1167
+ sunday: 0,
1168
+ }.freeze, T.untyped)
1169
+
1170
+ # _@param_ `today_getter`
1171
+ #
1172
+ # _@param_ `now_getter`
1173
+ sig { params(today_getter: T.class_of(Date), now_getter: T.class_of(Time)).void }
1174
+ def initialize(today_getter: Date, now_getter: Time); end
1175
+
1176
+ # _@param_ `date_or_time`
1177
+ #
1178
+ # _@param_ `period` — Valid values: :this_week, :now_or_before, :indefinite, [:less_than_n_days_ago, Integer]
1179
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), period: T.any(Symbol, T::Array[[Symbol, Integer]])).returns(T::Boolean) }
1180
+ def in_period?(date_or_time, period); end
1181
+
1182
+ # _@param_ `date_or_time`
1183
+ #
1184
+ # _@param_ `num_days`
1185
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), num_days: Integer).returns(T::Boolean) }
1186
+ def greater_than_or_equal_to_n_days_from_today?(date_or_time, num_days); end
1187
+
1188
+ # _@param_ `date_or_time`
1189
+ #
1190
+ # _@param_ `num_days`
1191
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), num_days: Integer).returns(T::Boolean) }
1192
+ def greater_than_or_equal_to_n_days_from_now?(date_or_time, num_days); end
1193
+
1194
+ # _@param_ `date_or_time`
1195
+ #
1196
+ # _@param_ `num_days`
1197
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), num_days: Integer).returns(T::Boolean) }
1198
+ def less_than_n_days_ago?(date_or_time, num_days); end
1199
+
1200
+ # _@param_ `date_or_time`
1201
+ #
1202
+ # _@param_ `num_days`
1203
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), num_days: Integer).returns(T::Boolean) }
1204
+ def less_than_n_days_from_now?(date_or_time, num_days); end
1205
+
1206
+ # _@param_ `date_or_time`
1207
+ sig { params(date_or_time: T.nilable(T.any(Date, Time))).returns(T::Boolean) }
1208
+ def this_week?(date_or_time); end
1209
+
1210
+ # _@param_ `date_or_time`
1211
+ sig { params(date_or_time: T.nilable(T.any(Date, Time))).returns(T::Boolean) }
1212
+ def next_week?(date_or_time); end
1213
+
1214
+ # _@param_ `date_or_time`
1215
+ #
1216
+ # _@param_ `day_of_week`
1217
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), day_of_week: Symbol).returns(T::Boolean) }
1218
+ def day_of_week?(date_or_time, day_of_week); end
1219
+
1220
+ # _@param_ `date_or_time`
1221
+ sig { params(date_or_time: T.nilable(T.any(Date, Time))).returns(T::Boolean) }
1222
+ def now_or_before?(date_or_time); end
1223
+
1224
+ # _@param_ `num_days`
1225
+ sig { params(num_days: Integer).returns(Time) }
1226
+ def n_days_from_now(num_days); end
1227
+
1228
+ # _@param_ `num_days`
1229
+ sig { params(num_days: Integer).returns(Date) }
1230
+ def n_days_from_today(num_days); end
1231
+
1232
+ # _@param_ `date_or_time`
1233
+ #
1234
+ # _@param_ `beginning_num_days_from_now`
1235
+ #
1236
+ # _@param_ `end_num_days_from_now`
1237
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), beginning_num_days_from_now: T.nilable(Integer), end_num_days_from_now: T.nilable(Integer)).returns(T::Boolean) }
1238
+ def between_relative_days?(date_or_time, beginning_num_days_from_now, end_num_days_from_now); end
1239
+
1240
+ # _@param_ `date_or_time`
1241
+ #
1242
+ # _@param_ `period_name`
1243
+ #
1244
+ # _@param_ `args`
1245
+ sig { params(date_or_time: T.nilable(T.any(Date, Time)), period_name: Symbol, args: Object).returns(T::Boolean) }
1246
+ def compound_in_period?(date_or_time, period_name, *args); end
1247
+
1248
+ sig { void }
1249
+ def self.run; end
1250
+
1251
+ sig { returns(::Logger) }
1252
+ def logger; end
1253
+
1254
+ # _@param_ `message`
1255
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1256
+ def error(message = nil, &block); end
1257
+
1258
+ # _@param_ `message`
1259
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1260
+ def warn(message = nil, &block); end
1261
+
1262
+ # _@param_ `message`
1263
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1264
+ def info(message = nil, &block); end
1265
+
1266
+ # _@param_ `message`
1267
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1268
+ def debug(message = nil, &block); end
1269
+
1270
+ # _@param_ `message`
1271
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1272
+ def finer(message = nil, &block); end
1273
+
1274
+ # @sg-ignore
1275
+ sig { returns(Symbol) }
1276
+ def log_level; end
1277
+ end
1278
+
1279
+ # Pulls a configured Asana client object which can be used to access the API
1280
+ class Clients
1281
+ MINUTE = T.let(60, T.untyped)
1282
+ HOUR = T.let(MINUTE * 60, T.untyped)
1283
+ DAY = T.let(24 * HOUR, T.untyped)
1284
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
1285
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1286
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
1287
+
1288
+ # _@param_ `config`
1289
+ #
1290
+ # _@param_ `asana_client_class`
1291
+ sig { params(config: Checkoff::Internal::EnvFallbackConfigLoader, asana_client_class: T.class_of(Asana::Client)).void }
1292
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), asana_client_class: Asana::Client); end
1293
+
1294
+ sig { returns(Asana::Client) }
1295
+ def client; end
1296
+
1297
+ sig { void }
1298
+ def self.run; end
1299
+ end
1300
+
1301
+ # Query different sections of Asana 'My Tasks' projects
1302
+ class MyTasks
1303
+ MINUTE = T.let(60, T.untyped)
1304
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1305
+ SHORT_CACHE_TIME = T.let(MINUTE * 5, T.untyped)
1306
+
1307
+ # _@param_ `config`
1308
+ #
1309
+ # _@param_ `client`
1310
+ #
1311
+ # _@param_ `projects`
1312
+ sig { params(config: Checkoff::Internal::EnvFallbackConfigLoader, client: Asana::Client, projects: Checkoff::Projects).void }
1313
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), client: Checkoff::Clients.new(config: config).client, projects: Checkoff::Projects.new(config: config,
1314
+ client: client)); end
1315
+
1316
+ # Given a 'My Tasks' project object, pull all tasks, then provide
1317
+ # a Hash of tasks with section name -> task list of the
1318
+ # uncompleted tasks.
1319
+ #
1320
+ # _@param_ `project`
1321
+ #
1322
+ # _@param_ `only_uncompleted`
1323
+ #
1324
+ # _@param_ `extra_fields`
1325
+ sig { params(project: Asana::Resources::Project, only_uncompleted: T::Boolean, extra_fields: T::Array[String]).returns(T::Hash[String, T::Enumerable[Asana::Resources::Task]]) }
1326
+ def tasks_by_section_for_my_tasks(project, only_uncompleted: true, extra_fields: []); end
1327
+
1328
+ # _@param_ `name`
1329
+ sig { params(name: String).returns(T.nilable(String)) }
1330
+ def section_key(name); end
1331
+
1332
+ # Given a list of tasks in 'My Tasks', pull a Hash of tasks with
1333
+ # section name -> task list
1334
+ #
1335
+ # _@param_ `tasks`
1336
+ #
1337
+ # _@param_ `project_gid`
1338
+ sig { params(tasks: T::Enumerable[Asana::Resources::Task], project_gid: String).returns(T::Hash[String, T::Enumerable[Asana::Resources::Task]]) }
1339
+ def by_my_tasks_section(tasks, project_gid); end
1340
+
1341
+ sig { returns(Checkoff::Projects) }
1342
+ attr_reader :projects
1343
+
1344
+ sig { returns(Asana::Client) }
1345
+ attr_reader :client
1346
+ end
1347
+
1348
+ # Work with projects in Asana
1349
+ class Projects
1350
+ include Logging
1351
+ extend CacheMethod::ClassMethods
1352
+ MINUTE = T.let(60, T.untyped)
1353
+ HOUR = T.let(MINUTE * 60, T.untyped)
1354
+ DAY = T.let(24 * HOUR, T.untyped)
1355
+ REALLY_LONG_CACHE_TIME = T.let(MINUTE * 30, T.untyped)
1356
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1357
+ MEDIUM_CACHE_TIME = T.let(MINUTE * 5, T.untyped)
1358
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
1359
+
1360
+ # _@param_ `config`
1361
+ #
1362
+ # _@param_ `client`
1363
+ #
1364
+ # _@param_ `workspaces`
1365
+ #
1366
+ # _@param_ `project_hashes`
1367
+ #
1368
+ # _@param_ `project_timing`
1369
+ #
1370
+ # _@param_ `timing`
1371
+ sig do
1372
+ params(
1373
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
1374
+ client: Asana::Client,
1375
+ workspaces: Checkoff::Workspaces,
1376
+ project_hashes: Checkoff::Internal::ProjectHashes,
1377
+ project_timing: Checkoff::Internal::ProjectTiming,
1378
+ timing: Checkoff::Timing
1379
+ ).void
1380
+ end
1381
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), client: Checkoff::Clients.new(config: config).client, workspaces: Checkoff::Workspaces.new(config: config,
1382
+ client: client), project_hashes: Checkoff::Internal::ProjectHashes.new, project_timing: Checkoff::Internal::ProjectTiming.new(client: client), timing: Checkoff::Timing.new); end
1383
+
1384
+ # _@param_ `extra_fields`
1385
+ sig { params(extra_fields: T::Array[String]).returns(T::Array[String]) }
1386
+ def task_fields(extra_fields: []); end
1387
+
1388
+ # Default options used in Asana API to pull tasks
1389
+ #
1390
+ # _@param_ `extra_fields`
1391
+ #
1392
+ # _@param_ `only_uncompleted`
1393
+ sig { params(extra_fields: T::Array[String], only_uncompleted: T::Boolean).returns(T::Hash[Symbol, Object]) }
1394
+ def task_options(extra_fields: [], only_uncompleted: false); end
1395
+
1396
+ # _@param_ `extra_project_fields`
1397
+ sig { params(extra_project_fields: T::Array[String]).returns(T::Array[String]) }
1398
+ def project_fields(extra_project_fields: []); end
1399
+
1400
+ # Default options used in Asana API to pull projects
1401
+ #
1402
+ # _@param_ `extra_project_fields`
1403
+ sig { params(extra_project_fields: T::Array[String]).returns(T::Hash[Symbol, Object]) }
1404
+ def project_options(extra_project_fields: []); end
1405
+
1406
+ # pulls an Asana API project class given a name
1407
+ #
1408
+ # _@param_ `workspace_name`
1409
+ #
1410
+ # _@param_ `project_name` — - :my_tasks or a project name
1411
+ #
1412
+ # _@param_ `extra_fields`
1413
+ sig { params(workspace_name: String, project_name: T.any(String, Symbol), extra_fields: T::Array[String]).returns(T.nilable(Asana::Resources::Project)) }
1414
+ def project(workspace_name, project_name, extra_fields: []); end
1415
+
1416
+ # _@param_ `workspace_name`
1417
+ #
1418
+ # _@param_ `project_name` — - :my_tasks or a project name
1419
+ #
1420
+ # _@param_ `extra_fields`
1421
+ sig { params(workspace_name: String, project_name: T.any(String, Symbol), extra_fields: T::Array[String]).returns(Asana::Resources::Project) }
1422
+ def project_or_raise(workspace_name, project_name, extra_fields: []); end
1423
+
1424
+ # _@param_ `gid`
1425
+ #
1426
+ # _@param_ `extra_fields`
1427
+ sig { params(gid: String, extra_fields: T::Array[String]).returns(T.nilable(Asana::Resources::Project)) }
1428
+ def project_by_gid(gid, extra_fields: []); end
1429
+
1430
+ # find uncompleted tasks in a list
1431
+ #
1432
+ # _@param_ `tasks`
1433
+ sig { params(tasks: T::Enumerable[Asana::Resources::Task]).returns(T::Enumerable[Asana::Resources::Task]) }
1434
+ def active_tasks(tasks); end
1435
+
1436
+ # Pull task objects from a named project
1437
+ #
1438
+ # _@param_ `project`
1439
+ #
1440
+ # _@param_ `only_uncompleted`
1441
+ #
1442
+ # _@param_ `extra_fields`
1443
+ sig { params(project: Asana::Resources::Project, only_uncompleted: T::Boolean, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Task]) }
1444
+ def tasks_from_project(project, only_uncompleted: true, extra_fields: []); end
1445
+
1446
+ # Pull task objects from a project identified by a gid
1447
+ #
1448
+ # _@param_ `project_gid`
1449
+ #
1450
+ # _@param_ `only_uncompleted`
1451
+ #
1452
+ # _@param_ `extra_fields`
1453
+ sig { params(project_gid: String, only_uncompleted: T::Boolean, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Task]) }
1454
+ def tasks_from_project_gid(project_gid, only_uncompleted: true, extra_fields: []); end
1455
+
1456
+ # _@param_ `workspace_name`
1457
+ #
1458
+ # _@param_ `extra_fields`
1459
+ sig { params(workspace_name: String, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Project]) }
1460
+ def projects_by_workspace_name(workspace_name, extra_fields: []); end
1461
+
1462
+ # _@param_ `project_obj`
1463
+ #
1464
+ # _@param_ `project` — - :not_specified, :my_tasks or a project name
1465
+ sig { params(project_obj: Asana::Resources::Project, project: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) }
1466
+ def project_to_h(project_obj, project: :not_specified); end
1467
+
1468
+ # Indicates a project is ready for a person to work on it. This
1469
+ # is subtly different than what is used by Asana to mark a date as
1470
+ # red/green!
1471
+ #
1472
+ # A project is ready if there is no start date, or if the start
1473
+ # date is today or in the past.
1474
+ #
1475
+ # _@param_ `project`
1476
+ #
1477
+ # _@param_ `period` — See Checkoff::Timing#in_period? - :now_or_before,:this_week
1478
+ sig { params(project: Asana::Resources::Project, period: T.any(Symbol, T::Array[T.untyped])).returns(T::Boolean) }
1479
+ def project_ready?(project, period: :now_or_before); end
1480
+
1481
+ # _@param_ `project`
1482
+ #
1483
+ # _@param_ `field_name`
1484
+ #
1485
+ # _@param_ `period` — See Checkoff::Timing#in_period? - :now_or_before,:this_week
1486
+ sig { params(project: Asana::Resources::Project, field_name: T.any(Symbol, T::Array[T.untyped]), period: T.any(Symbol, T::Array[T.untyped])).returns(T::Boolean) }
1487
+ def in_period?(project, field_name, period); end
1488
+
1489
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
1490
+ def as_cache_key; end
1491
+
1492
+ sig { returns(Asana::ProxiedResourceClasses::Project) }
1493
+ def projects; end
1494
+
1495
+ # _@param_ `workspace_name`
1496
+ sig { params(workspace_name: String).returns(Asana::Resources::Project) }
1497
+ def my_tasks(workspace_name); end
1498
+
1499
+ sig { returns(::Logger) }
1500
+ def logger; end
1501
+
1502
+ # _@param_ `message`
1503
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1504
+ def error(message = nil, &block); end
1505
+
1506
+ # _@param_ `message`
1507
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1508
+ def warn(message = nil, &block); end
1509
+
1510
+ # _@param_ `message`
1511
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1512
+ def info(message = nil, &block); end
1513
+
1514
+ # _@param_ `message`
1515
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1516
+ def debug(message = nil, &block); end
1517
+
1518
+ # _@param_ `message`
1519
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1520
+ def finer(message = nil, &block); end
1521
+
1522
+ # @sg-ignore
1523
+ sig { returns(Symbol) }
1524
+ def log_level; end
1525
+
1526
+ sig { returns(Checkoff::Timing) }
1527
+ attr_reader :timing
1528
+
1529
+ sig { returns(Checkoff::Internal::ProjectTiming) }
1530
+ attr_reader :project_timing
1531
+
1532
+ sig { returns(Checkoff::Internal::ProjectHashes) }
1533
+ attr_reader :project_hashes
1534
+
1535
+ sig { returns(Asana::Client) }
1536
+ attr_reader :client
1537
+ end
1538
+
1539
+ # Query different sections of Asana projects
1540
+ class Sections
1541
+ include Logging
1542
+ extend CacheMethod::ClassMethods
1543
+ extend Forwardable
1544
+ MINUTE = T.let(60, T.untyped)
1545
+ HOUR = T.let(MINUTE * 60, T.untyped)
1546
+ REALLY_LONG_CACHE_TIME = T.let(MINUTE * 30, T.untyped)
1547
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1548
+ SHORT_CACHE_TIME = T.let(MINUTE * 5, T.untyped)
1549
+
1550
+ # _@param_ `config`
1551
+ #
1552
+ # _@param_ `client`
1553
+ #
1554
+ # _@param_ `projects`
1555
+ #
1556
+ # _@param_ `workspaces`
1557
+ #
1558
+ # _@param_ `time`
1559
+ sig do
1560
+ params(
1561
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
1562
+ client: Asana::Client,
1563
+ projects: Checkoff::Projects,
1564
+ workspaces: Checkoff::Workspaces,
1565
+ time: T.class_of(Time)
1566
+ ).void
1567
+ end
1568
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), client: Checkoff::Clients.new(config: config).client, projects: Checkoff::Projects.new(config: config,
1569
+ client: client), workspaces: Checkoff::Workspaces.new(config: config,
1570
+ client: client), time: Time); end
1571
+
1572
+ # Returns a list of Asana API section objects for a given project
1573
+ #
1574
+ # _@param_ `workspace_name`
1575
+ #
1576
+ # _@param_ `project_name`
1577
+ #
1578
+ # _@param_ `extra_fields`
1579
+ sig { params(workspace_name: String, project_name: T.any(String, Symbol), extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Section]) }
1580
+ def sections_or_raise(workspace_name, project_name, extra_fields: []); end
1581
+
1582
+ # Returns a list of Asana API section objects for a given project GID
1583
+ #
1584
+ # _@param_ `project_gid`
1585
+ #
1586
+ # _@param_ `extra_fields`
1587
+ sig { params(project_gid: String, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Section]) }
1588
+ def sections_by_project_gid(project_gid, extra_fields: []); end
1589
+
1590
+ # sord warn - "[String" does not appear to be a type
1591
+ # sord warn - "nil]" does not appear to be a type
1592
+ # sord warn - Invalid hash, must have exactly two types: "Hash{[String, nil] => Enumerable<Asana::Resources::Task>}".
1593
+ # Given a workspace name and project name, then provide a Hash of
1594
+ # tasks with section name -> task list of the uncompleted tasks
1595
+ #
1596
+ # _@param_ `workspace_name`
1597
+ #
1598
+ # _@param_ `project_name`
1599
+ #
1600
+ # _@param_ `only_uncompleted`
1601
+ #
1602
+ # _@param_ `extra_fields`
1603
+ sig do
1604
+ params(
1605
+ workspace_name: String,
1606
+ project_name: T.any(String, Symbol),
1607
+ only_uncompleted: T::Boolean,
1608
+ extra_fields: T::Array[String]
1609
+ ).returns(T.untyped)
1610
+ end
1611
+ def tasks_by_section(workspace_name, project_name, only_uncompleted: true, extra_fields: []); end
1612
+
1613
+ # _@param_ `section_gid`
1614
+ #
1615
+ # _@param_ `only_uncompleted`
1616
+ #
1617
+ # _@param_ `extra_fields`
1618
+ sig { params(section_gid: String, only_uncompleted: T::Boolean, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Task]) }
1619
+ def tasks_by_section_gid(section_gid, only_uncompleted: true, extra_fields: []); end
1620
+
1621
+ # Pulls task objects from a specified section
1622
+ #
1623
+ # _@param_ `workspace_name`
1624
+ #
1625
+ # _@param_ `project_name`
1626
+ #
1627
+ # _@param_ `section_name`
1628
+ #
1629
+ # _@param_ `only_uncompleted`
1630
+ #
1631
+ # _@param_ `extra_fields`
1632
+ sig do
1633
+ params(
1634
+ workspace_name: String,
1635
+ project_name: T.any(String, Symbol),
1636
+ section_name: T.nilable(String),
1637
+ only_uncompleted: T::Boolean,
1638
+ extra_fields: T::Array[String]
1639
+ ).returns(T::Enumerable[Asana::Resources::Task])
1640
+ end
1641
+ def tasks(workspace_name, project_name, section_name, only_uncompleted: true, extra_fields: []); end
1642
+
1643
+ # Pulls just names of tasks from a given section.
1644
+ #
1645
+ # _@param_ `workspace_name`
1646
+ #
1647
+ # _@param_ `project_name`
1648
+ #
1649
+ # _@param_ `section_name`
1650
+ sig { params(workspace_name: String, project_name: T.any(String, Symbol), section_name: T.nilable(String)).returns(T::Array[String]) }
1651
+ def section_task_names(workspace_name, project_name, section_name); end
1652
+
1653
+ # @sg-ignore
1654
+ #
1655
+ # _@param_ `workspace_name`
1656
+ #
1657
+ # _@param_ `project_name`
1658
+ #
1659
+ # _@param_ `section_name`
1660
+ #
1661
+ # _@param_ `extra_section_fields`
1662
+ sig do
1663
+ params(
1664
+ workspace_name: String,
1665
+ project_name: T.any(String, Symbol),
1666
+ section_name: T.nilable(String),
1667
+ extra_section_fields: T::Array[String]
1668
+ ).returns(Asana::Resources::Section)
1669
+ end
1670
+ def section_or_raise(workspace_name, project_name, section_name, extra_section_fields: []); end
1671
+
1672
+ # _@param_ `name`
1673
+ sig { params(name: String).returns(T.nilable(String)) }
1674
+ def section_key(name); end
1675
+
1676
+ # _@param_ `section`
1677
+ sig { params(section: Asana::Resources::Section).returns(T.nilable(Asana::Resources::Section)) }
1678
+ def previous_section(section); end
1679
+
1680
+ # _@param_ `gid`
1681
+ sig { params(gid: String).returns(T.nilable(Asana::Resources::Section)) }
1682
+ def section_by_gid(gid); end
1683
+
1684
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
1685
+ def as_cache_key; end
1686
+
1687
+ # @sg-ignore
1688
+ #
1689
+ # _@param_ `workspace_name`
1690
+ #
1691
+ # _@param_ `project_name`
1692
+ #
1693
+ # _@param_ `section_name`
1694
+ #
1695
+ # _@param_ `extra_section_fields`
1696
+ sig do
1697
+ params(
1698
+ workspace_name: String,
1699
+ project_name: T.any(String, Symbol),
1700
+ section_name: T.nilable(String),
1701
+ extra_section_fields: T::Array[String]
1702
+ ).returns(T.nilable(Asana::Resources::Section))
1703
+ end
1704
+ def section(workspace_name, project_name, section_name, extra_section_fields: []); end
1705
+
1706
+ # sord warn - Faraday::Response wasn't able to be resolved to a constant in this project
1707
+ # https://github.com/Asana/ruby-asana/blob/master/lib/asana/resource_includes/response_helper.rb#L7
1708
+ #
1709
+ # _@param_ `response`
1710
+ sig { params(response: Faraday::Response).returns(T::Array[T.any(T::Hash[T.untyped, T.untyped], T::Hash[T.untyped, T.untyped])]) }
1711
+ def parse(response); end
1712
+
1713
+ # sord warn - "[String" does not appear to be a type
1714
+ # sord warn - "nil]" does not appear to be a type
1715
+ # sord warn - Invalid hash, must have exactly two types: "Hash<[String,nil], Enumerable<Asana::Resources::Task>>".
1716
+ # Given a project object, pull all tasks, then provide a Hash of
1717
+ # tasks with section name -> task list of the uncompleted tasks
1718
+ #
1719
+ # _@param_ `project`
1720
+ #
1721
+ # _@param_ `only_uncompleted`
1722
+ #
1723
+ # _@param_ `extra_fields`
1724
+ sig { params(project: Asana::Resources::Project, only_uncompleted: T::Boolean, extra_fields: T::Array[String]).returns(T.untyped) }
1725
+ def tasks_by_section_for_project(project, only_uncompleted: true, extra_fields: []); end
1726
+
1727
+ # sord warn - "[String" does not appear to be a type
1728
+ # sord warn - "nil]" does not appear to be a type
1729
+ # sord warn - Invalid hash, must have exactly two types: "Hash<[String,nil], Enumerable<Asana::Resources::Task>>".
1730
+ # Given a list of tasks, pull a Hash of tasks with section name -> task list
1731
+ #
1732
+ # _@param_ `tasks`
1733
+ #
1734
+ # _@param_ `project_gid`
1735
+ sig { params(tasks: T::Enumerable[Asana::Resources::Task], project_gid: String).returns(T.untyped) }
1736
+ def by_section(tasks, project_gid); end
1737
+
1738
+ # sord warn - "[String" does not appear to be a type
1739
+ # sord warn - "nil]" does not appear to be a type
1740
+ # sord warn - Invalid hash, must have exactly two types: "Hash{[String, nil] => Enumerable<Asana::Resources::Task>}".
1741
+ # _@param_ `by_section`
1742
+ #
1743
+ # _@param_ `task`
1744
+ #
1745
+ # _@param_ `project_gid`
1746
+ sig { params(by_section: T.untyped, task: Asana::Resources::Task, project_gid: String).void }
1747
+ def file_task_by_section(by_section, task, project_gid); end
1748
+
1749
+ # _@param_ `workspace_name`
1750
+ #
1751
+ # _@param_ `project_name`
1752
+ sig { params(workspace_name: String, project_name: T.any(String, Symbol)).returns(Asana::Resources::Project) }
1753
+ def project_or_raise(workspace_name, project_name); end
1754
+
1755
+ sig { returns(::Logger) }
1756
+ def logger; end
1757
+
1758
+ # _@param_ `message`
1759
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1760
+ def error(message = nil, &block); end
1761
+
1762
+ # _@param_ `message`
1763
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1764
+ def warn(message = nil, &block); end
1765
+
1766
+ # _@param_ `message`
1767
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1768
+ def info(message = nil, &block); end
1769
+
1770
+ # _@param_ `message`
1771
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1772
+ def debug(message = nil, &block); end
1773
+
1774
+ # _@param_ `message`
1775
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
1776
+ def finer(message = nil, &block); end
1777
+
1778
+ # @sg-ignore
1779
+ sig { returns(Symbol) }
1780
+ def log_level; end
1781
+
1782
+ sig { returns(Checkoff::Projects) }
1783
+ attr_reader :projects
1784
+
1785
+ sig { returns(Checkoff::Workspaces) }
1786
+ attr_reader :workspaces
1787
+
1788
+ sig { returns(T.class_of(Time)) }
1789
+ attr_reader :time
1790
+
1791
+ sig { returns(Checkoff::MyTasks) }
1792
+ attr_reader :my_tasks
1793
+
1794
+ sig { returns(Asana::Client) }
1795
+ attr_reader :client
1796
+ end
1797
+
1798
+ # Query different subtasks of Asana tasks
1799
+ class Subtasks
1800
+ extend CacheMethod::ClassMethods
1801
+ extend Forwardable
1802
+ MINUTE = T.let(60, T.untyped)
1803
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1804
+ SHORT_CACHE_TIME = T.let(MINUTE * 5, T.untyped)
1805
+
1806
+ # _@param_ `config`
1807
+ #
1808
+ # _@param_ `projects`
1809
+ #
1810
+ # _@param_ `clients`
1811
+ sig { params(config: T::Hash[T.untyped, T.untyped], projects: Checkoff::Projects, clients: Checkoff::Clients).void }
1812
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), projects: Checkoff::Projects.new(config: config), clients: Checkoff::Clients.new(config: config)); end
1813
+
1814
+ # True if all subtasks of the task are completed
1815
+ #
1816
+ # _@param_ `task`
1817
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
1818
+ def all_subtasks_completed?(task); end
1819
+
1820
+ # sord warn - "[nil" does not appear to be a type
1821
+ # sord warn - "String]" does not appear to be a type
1822
+ # sord warn - Invalid hash, must have exactly two types: "Hash<[nil,String], Enumerable<Asana::Resources::Task>>".
1823
+ # pulls a Hash of subtasks broken out by section
1824
+ #
1825
+ # _@param_ `tasks`
1826
+ sig { params(tasks: T::Enumerable[Asana::Resources::Task]).returns(T.untyped) }
1827
+ def by_section(tasks); end
1828
+
1829
+ # Returns all subtasks, including section headers
1830
+ #
1831
+ # _@param_ `task`
1832
+ sig { params(task: Asana::Resources::Task).returns(T::Enumerable[Asana::Resources::Task]) }
1833
+ def raw_subtasks(task); end
1834
+
1835
+ # Pull a specific task by GID
1836
+ #
1837
+ # _@param_ `task_gid`
1838
+ #
1839
+ # _@param_ `extra_fields`
1840
+ #
1841
+ # _@param_ `only_uncompleted`
1842
+ sig { params(task_gid: String, extra_fields: T::Array[String], only_uncompleted: T::Boolean).returns(T::Enumerable[Asana::Resources::Task]) }
1843
+ def subtasks_by_gid(task_gid, extra_fields: [], only_uncompleted: true); end
1844
+
1845
+ # True if the subtask passed in represents a section in the subtasks
1846
+ #
1847
+ # Note: expect this to be removed in a future version, as Asana is
1848
+ # expected to move to the new-style way of representing sections
1849
+ # as memberships with a separate API within a task.
1850
+ #
1851
+ # _@param_ `subtask`
1852
+ sig { params(subtask: Asana::Resources::Task).returns(T::Boolean) }
1853
+ def subtask_section?(subtask); end
1854
+
1855
+ # _@param_ `current_section`
1856
+ #
1857
+ # _@param_ `by_section`
1858
+ #
1859
+ # _@param_ `task`
1860
+ sig { params(current_section: T.nilable(String), by_section: T::Hash[T.untyped, T.untyped], task: Asana::Resources::Task).returns(T::Array[[String, T::Hash[T.untyped, T.untyped]]]) }
1861
+ def file_task_by_section(current_section, by_section, task); end
1862
+
1863
+ sig { returns(Checkoff::Projects) }
1864
+ attr_reader :projects
1865
+
1866
+ sig { returns(Asana::Client) }
1867
+ attr_reader :client
1868
+ end
1869
+
1870
+ # Deal with Asana resources across different resource types
1871
+ class Resources
1872
+ extend CacheMethod::ClassMethods
1873
+ MINUTE = T.let(60, T.untyped)
1874
+ HOUR = T.let(MINUTE * 60, T.untyped)
1875
+ DAY = T.let(24 * HOUR, T.untyped)
1876
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
1877
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1878
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
1879
+
1880
+ # _@param_ `config`
1881
+ #
1882
+ # _@param_ `workspaces`
1883
+ #
1884
+ # _@param_ `tasks`
1885
+ #
1886
+ # _@param_ `sections`
1887
+ #
1888
+ # _@param_ `projects`
1889
+ #
1890
+ # _@param_ `clients`
1891
+ #
1892
+ # _@param_ `client`
1893
+ sig do
1894
+ params(
1895
+ config: T::Hash[T.untyped, T.untyped],
1896
+ workspaces: Checkoff::Workspaces,
1897
+ tasks: Checkoff::Tasks,
1898
+ sections: Checkoff::Sections,
1899
+ projects: Checkoff::Projects,
1900
+ clients: Checkoff::Clients,
1901
+ client: Asana::Client
1902
+ ).void
1903
+ end
1904
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), tasks: Checkoff::Tasks.new(config: config), sections: Checkoff::Sections.new(config: config), projects: Checkoff::Projects.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client); end
1905
+
1906
+ # sord warn - "[Asana::Resource" does not appear to be a type
1907
+ # sord warn - "nil]" does not appear to be a type
1908
+ # sord warn - "[String" does not appear to be a type
1909
+ # sord warn - "nil]" does not appear to be a type
1910
+ # Attempt to look up a GID, even in situations where we don't
1911
+ # have a resource type provided.
1912
+ #
1913
+ # _@param_ `gid`
1914
+ #
1915
+ # _@param_ `resource_type`
1916
+ sig { params(gid: String, resource_type: T.nilable(String)).returns(T::Array[[T.untyped, T.untyped, T.untyped, T.untyped]]) }
1917
+ def resource_by_gid(gid, resource_type: nil); end
1918
+
1919
+ # _@param_ `gid`
1920
+ sig { params(gid: String).returns(T.nilable(Asana::Resources::Task)) }
1921
+ def fetch_task_gid(gid); end
1922
+
1923
+ # _@param_ `section_gid`
1924
+ sig { params(section_gid: String).returns(T.nilable(Asana::Resources::Section)) }
1925
+ def fetch_section_gid(section_gid); end
1926
+
1927
+ # _@param_ `project_gid`
1928
+ sig { params(project_gid: String).returns(T.nilable(Asana::Resources::Project)) }
1929
+ def fetch_project_gid(project_gid); end
1930
+
1931
+ sig { void }
1932
+ def self.run; end
1933
+
1934
+ sig { returns(Checkoff::Workspaces) }
1935
+ attr_reader :workspaces
1936
+
1937
+ sig { returns(Checkoff::Projects) }
1938
+ attr_reader :projects
1939
+
1940
+ sig { returns(Checkoff::Sections) }
1941
+ attr_reader :sections
1942
+
1943
+ sig { returns(Checkoff::Tasks) }
1944
+ attr_reader :tasks
1945
+
1946
+ sig { returns(Asana::Client) }
1947
+ attr_reader :client
1948
+ end
1949
+
1950
+ # Manages timelines of dependent tasks with dates and milestones
1951
+ class Timelines
1952
+ extend CacheMethod::ClassMethods
1953
+ MINUTE = T.let(60, T.untyped)
1954
+ HOUR = T.let(MINUTE * 60, T.untyped)
1955
+ DAY = T.let(24 * HOUR, T.untyped)
1956
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
1957
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
1958
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
1959
+
1960
+ # _@param_ `config`
1961
+ #
1962
+ # _@param_ `workspaces`
1963
+ #
1964
+ # _@param_ `sections`
1965
+ #
1966
+ # _@param_ `tasks`
1967
+ #
1968
+ # _@param_ `portfolios`
1969
+ #
1970
+ # _@param_ `clients`
1971
+ #
1972
+ # _@param_ `client`
1973
+ sig do
1974
+ params(
1975
+ config: T::Hash[T.untyped, T.untyped],
1976
+ workspaces: Checkoff::Workspaces,
1977
+ sections: Checkoff::Sections,
1978
+ tasks: Checkoff::Tasks,
1979
+ portfolios: Checkoff::Portfolios,
1980
+ clients: Checkoff::Clients,
1981
+ client: Asana::Client
1982
+ ).void
1983
+ end
1984
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), sections: Checkoff::Sections.new(config: config), tasks: Checkoff::Tasks.new(config: config), portfolios: Checkoff::Portfolios.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client); end
1985
+
1986
+ # _@param_ `task`
1987
+ #
1988
+ # _@param_ `limit_to_portfolio_gid`
1989
+ #
1990
+ # _@param_ `project_name`
1991
+ sig { params(task: Asana::Resources::Task, limit_to_portfolio_gid: T.nilable(String)).returns(T::Boolean) }
1992
+ def task_dependent_on_previous_section_last_milestone?(task, limit_to_portfolio_gid: nil); end
1993
+
1994
+ # _@param_ `task`
1995
+ #
1996
+ # _@param_ `limit_to_portfolio_name`
1997
+ sig { params(task: Asana::Resources::Task, limit_to_portfolio_name: T.nilable(String)).returns(T::Boolean) }
1998
+ def last_task_milestone_depends_on_this_task?(task, limit_to_portfolio_name: nil); end
1999
+
2000
+ # _@param_ `task`
2001
+ #
2002
+ # _@param_ `limit_to_portfolio_name`
2003
+ sig { params(task: Asana::Resources::Task, limit_to_portfolio_name: T.nilable(String)).returns(T::Boolean) }
2004
+ def any_milestone_depends_on_this_task?(task, limit_to_portfolio_name: nil); end
2005
+
2006
+ # _@param_ `section_gid`
2007
+ sig { params(section_gid: String).returns(T.nilable(Asana::Resources::Task)) }
2008
+ def last_milestone_in_section(section_gid); end
2009
+
2010
+ # _@param_ `task_data`
2011
+ #
2012
+ # _@param_ `section`
2013
+ sig { params(task_data: T::Hash[T.untyped, T.untyped], section: Asana::Resources::Section).returns(T::Boolean) }
2014
+ def task_data_dependent_on_previous_section_last_milestone?(task_data, section); end
2015
+
2016
+ sig { void }
2017
+ def self.run; end
2018
+
2019
+ sig { returns(Checkoff::Workspaces) }
2020
+ attr_reader :workspaces
2021
+
2022
+ sig { returns(Asana::Client) }
2023
+ attr_reader :client
2024
+ end
2025
+
2026
+ # Pull portfolios from Asana
2027
+ class Portfolios
2028
+ extend CacheMethod::ClassMethods
2029
+ extend T::Sig
2030
+ MINUTE = T.let(60, T.untyped)
2031
+ HOUR = T.let(T.let(MINUTE * 60, Numeric), T.untyped)
2032
+ DAY = T.let(T.let(24 * HOUR, Numeric), T.untyped)
2033
+ REALLY_LONG_CACHE_TIME = T.let(T.let(HOUR * 1, Numeric), T.untyped)
2034
+ LONG_CACHE_TIME = T.let(T.let(MINUTE * 15, Numeric), T.untyped)
2035
+ SHORT_CACHE_TIME = T.let(T.let(MINUTE, Numeric), T.untyped)
2036
+
2037
+ # _@param_ `config`
2038
+ #
2039
+ # _@param_ `workspaces`
2040
+ #
2041
+ # _@param_ `clients`
2042
+ #
2043
+ # _@param_ `client`
2044
+ #
2045
+ # _@param_ `projects`
2046
+ sig do
2047
+ params(
2048
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
2049
+ clients: Checkoff::Clients,
2050
+ client: Asana::Client,
2051
+ projects: Checkoff::Projects,
2052
+ workspaces: Checkoff::Workspaces
2053
+ ).void
2054
+ end
2055
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), clients: Checkoff::Clients.new(config: config), client: clients.client, projects: Checkoff::Projects.new(config: config, client: client), workspaces: Checkoff::Workspaces.new(config: config, client: client)); end
2056
+
2057
+ # _@param_ `workspace_name`
2058
+ #
2059
+ # _@param_ `portfolio_name`
2060
+ sig { params(workspace_name: String, portfolio_name: String).returns(Asana::Resources::Portfolio) }
2061
+ def portfolio_or_raise(workspace_name, portfolio_name); end
2062
+
2063
+ # @sg-ignore
2064
+ #
2065
+ # _@param_ `workspace_name`
2066
+ #
2067
+ # _@param_ `portfolio_name`
2068
+ sig { params(workspace_name: String, portfolio_name: String).returns(T.nilable(Asana::Resources::Portfolio)) }
2069
+ def portfolio(workspace_name, portfolio_name); end
2070
+
2071
+ # Pull a specific portfolio by gid
2072
+ #
2073
+ # _@param_ `portfolio_gid`
2074
+ #
2075
+ # _@param_ `extra_fields`
2076
+ sig { params(portfolio_gid: String, extra_fields: T::Array[String]).returns(T.nilable(Asana::Resources::Portfolio)) }
2077
+ def portfolio_by_gid(portfolio_gid, extra_fields: []); end
2078
+
2079
+ # _@param_ `workspace_name`
2080
+ #
2081
+ # _@param_ `portfolio_name`
2082
+ #
2083
+ # _@param_ `extra_project_fields`
2084
+ sig { params(workspace_name: String, portfolio_name: String, extra_project_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Project]) }
2085
+ def projects_in_portfolio(workspace_name, portfolio_name, extra_project_fields: []); end
2086
+
2087
+ # _@param_ `portfolio`
2088
+ #
2089
+ # _@param_ `extra_project_fields`
2090
+ sig { params(portfolio: Asana::Resources::Portfolio, extra_project_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Project]) }
2091
+ def projects_in_portfolio_obj(portfolio, extra_project_fields: []); end
2092
+
2093
+ sig { void }
2094
+ def self.run; end
2095
+
2096
+ sig { returns(Checkoff::Workspaces) }
2097
+ attr_reader :workspaces
2098
+
2099
+ sig { returns(Checkoff::Projects) }
2100
+ attr_reader :projects
2101
+
2102
+ sig { returns(Asana::Client) }
2103
+ attr_reader :client
2104
+ end
2105
+
2106
+ # Query different workspaces of Asana projects
2107
+ class Workspaces
2108
+ extend CacheMethod::ClassMethods
2109
+ MINUTE = T.let(60, T.untyped)
2110
+ HOUR = T.let(MINUTE * 60, T.untyped)
2111
+ DAY = T.let(24 * HOUR, T.untyped)
2112
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2113
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2114
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2115
+
2116
+ # _@param_ `config`
2117
+ #
2118
+ # _@param_ `client`
2119
+ #
2120
+ # _@param_ `asana_workspace`
2121
+ sig { params(config: Checkoff::Internal::EnvFallbackConfigLoader, client: Asana::Client, asana_workspace: T.class_of(Asana::Resources::Workspace)).void }
2122
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), client: Checkoff::Clients.new(config: config).client, asana_workspace: Asana::Resources::Workspace); end
2123
+
2124
+ # Pulls an Asana workspace object
2125
+ # @sg-ignore
2126
+ #
2127
+ # _@param_ `workspace_name`
2128
+ sig { params(workspace_name: String).returns(T.nilable(Asana::Resources::Workspace)) }
2129
+ def workspace(workspace_name); end
2130
+
2131
+ sig { returns(Asana::Resources::Workspace) }
2132
+ def default_workspace; end
2133
+
2134
+ # _@param_ `workspace_name`
2135
+ sig { params(workspace_name: String).returns(Asana::Resources::Workspace) }
2136
+ def workspace_or_raise(workspace_name); end
2137
+
2138
+ # @sg-ignore
2139
+ sig { returns(String) }
2140
+ def default_workspace_gid; end
2141
+
2142
+ sig { returns(Asana::Client) }
2143
+ attr_reader :client
2144
+ end
2145
+
2146
+ # Manage attachments in Asana
2147
+ class Attachments
2148
+ include Logging
2149
+ MINUTE = T.let(60, T.untyped)
2150
+ HOUR = T.let(MINUTE * 60, T.untyped)
2151
+ DAY = T.let(24 * HOUR, T.untyped)
2152
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2153
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2154
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2155
+
2156
+ # _@param_ `config`
2157
+ #
2158
+ # _@param_ `workspaces`
2159
+ #
2160
+ # _@param_ `clients`
2161
+ #
2162
+ # _@param_ `client`
2163
+ sig do
2164
+ params(
2165
+ config: T::Hash[T.untyped, T.untyped],
2166
+ workspaces: Checkoff::Workspaces,
2167
+ clients: Checkoff::Clients,
2168
+ client: Asana::Client
2169
+ ).void
2170
+ end
2171
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client); end
2172
+
2173
+ # sord warn - Asana::Resources::Attachment wasn't able to be resolved to a constant in this project
2174
+ # _@param_ `url`
2175
+ #
2176
+ # _@param_ `resource`
2177
+ #
2178
+ # _@param_ `attachment_name`
2179
+ #
2180
+ # _@param_ `just_the_url`
2181
+ #
2182
+ # _@param_ `verify_mode` — - e.g., OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER
2183
+ sig do
2184
+ params(
2185
+ url: String,
2186
+ resource: Asana::Resources::Resource,
2187
+ attachment_name: T.nilable(String),
2188
+ verify_mode: Integer,
2189
+ just_the_url: T::Boolean
2190
+ ).returns(Asana::Resources::Attachment)
2191
+ end
2192
+ def create_attachment_from_url!(url, resource, attachment_name: nil, verify_mode: OpenSSL::SSL::VERIFY_PEER, just_the_url: false); end
2193
+
2194
+ # sord warn - URI wasn't able to be resolved to a constant in this project
2195
+ # Writes contents of URL to a temporary file with the same
2196
+ # extension as the URL using Net::HTTP, raising an exception if
2197
+ # not succesful
2198
+ #
2199
+ # @sg-ignore
2200
+ #
2201
+ # _@param_ `uri`
2202
+ #
2203
+ # _@param_ `verify_mode` — - e.g., OpenSSL::SSL::VERIFY_NONE,OpenSSL::SSL::VERIFY_PEER
2204
+ sig { params(uri: URI, verify_mode: Integer, block: T.untyped).returns(Object) }
2205
+ def download_uri(uri, verify_mode: OpenSSL::SSL::VERIFY_PEER, &block); end
2206
+
2207
+ # sord warn - Net::HTTPResponse wasn't able to be resolved to a constant in this project
2208
+ # @sg-ignore
2209
+ #
2210
+ # _@param_ `response`
2211
+ sig { params(response: Net::HTTPResponse).returns(Object) }
2212
+ def write_tempfile_from_response(response); end
2213
+
2214
+ # sord warn - Asana::Resources::Attachment wasn't able to be resolved to a constant in this project
2215
+ # _@param_ `url`
2216
+ #
2217
+ # _@param_ `resource`
2218
+ #
2219
+ # _@param_ `attachment_name`
2220
+ #
2221
+ # _@param_ `verify_mode` — - e.g., OpenSSL::SSL::VERIFY_NONE,OpenSSL::SSL::VERIFY_PEER
2222
+ sig do
2223
+ params(
2224
+ url: String,
2225
+ resource: Asana::Resources::Resource,
2226
+ attachment_name: T.nilable(String),
2227
+ verify_mode: Integer
2228
+ ).returns(Asana::Resources::Attachment)
2229
+ end
2230
+ def create_attachment_from_downloaded_url!(url, resource, attachment_name:, verify_mode: OpenSSL::SSL::VERIFY_PEER); end
2231
+
2232
+ # sord warn - Asana::Resources::Attachment wasn't able to be resolved to a constant in this project
2233
+ # _@param_ `url`
2234
+ #
2235
+ # _@param_ `resource`
2236
+ #
2237
+ # _@param_ `attachment_name`
2238
+ sig { params(url: String, resource: Asana::Resources::Resource, attachment_name: T.nilable(String)).returns(Asana::Resources::Attachment) }
2239
+ def create_attachment_from_url_alone!(url, resource, attachment_name:); end
2240
+
2241
+ # @sg-ignore
2242
+ #
2243
+ # _@param_ `filename`
2244
+ sig { params(filename: String).returns(T.nilable(String)) }
2245
+ def content_type_from_filename(filename); end
2246
+
2247
+ # sord warn - Faraday::Response wasn't able to be resolved to a constant in this project
2248
+ # https://github.com/Asana/ruby-asana/blob/master/lib/asana/resource_includes/response_helper.rb#L7
2249
+ #
2250
+ # _@param_ `response`
2251
+ sig { params(response: Faraday::Response).returns(T::Array[T.any(T::Hash[T.untyped, T.untyped], T::Hash[T.untyped, T.untyped])]) }
2252
+ def parse(response); end
2253
+
2254
+ sig { void }
2255
+ def self.run; end
2256
+
2257
+ sig { returns(::Logger) }
2258
+ def logger; end
2259
+
2260
+ # _@param_ `message`
2261
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2262
+ def error(message = nil, &block); end
2263
+
2264
+ # _@param_ `message`
2265
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2266
+ def warn(message = nil, &block); end
2267
+
2268
+ # _@param_ `message`
2269
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2270
+ def info(message = nil, &block); end
2271
+
2272
+ # _@param_ `message`
2273
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2274
+ def debug(message = nil, &block); end
2275
+
2276
+ # _@param_ `message`
2277
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2278
+ def finer(message = nil, &block); end
2279
+
2280
+ # @sg-ignore
2281
+ sig { returns(Symbol) }
2282
+ def log_level; end
2283
+
2284
+ sig { returns(Checkoff::Workspaces) }
2285
+ attr_reader :workspaces
2286
+
2287
+ sig { returns(Asana::Client) }
2288
+ attr_reader :client
2289
+ end
2290
+
2291
+ # Work with custom fields in Asana
2292
+ class CustomFields
2293
+ extend CacheMethod::ClassMethods
2294
+ MINUTE = T.let(60, T.untyped)
2295
+ HOUR = T.let(MINUTE * 60, T.untyped)
2296
+ DAY = T.let(24 * HOUR, T.untyped)
2297
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2298
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2299
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2300
+
2301
+ # _@param_ `config`
2302
+ #
2303
+ # _@param_ `workspaces`
2304
+ #
2305
+ # _@param_ `clients`
2306
+ #
2307
+ # _@param_ `client`
2308
+ sig do
2309
+ params(
2310
+ config: Checkoff::Internal::EnvFallbackConfigLoader,
2311
+ clients: Checkoff::Clients,
2312
+ client: Asana::Client,
2313
+ workspaces: Checkoff::Workspaces
2314
+ ).void
2315
+ end
2316
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), clients: Checkoff::Clients.new(config: config), client: clients.client, workspaces: Checkoff::Workspaces.new(config: config,
2317
+ client: client)); end
2318
+
2319
+ # sord warn - Asana::Resources::CustomField wasn't able to be resolved to a constant in this project
2320
+ # _@param_ `workspace_name`
2321
+ #
2322
+ # _@param_ `custom_field_name`
2323
+ sig { params(workspace_name: String, custom_field_name: String).returns(Asana::Resources::CustomField) }
2324
+ def custom_field_or_raise(workspace_name, custom_field_name); end
2325
+
2326
+ # sord warn - Asana::Resources::CustomField wasn't able to be resolved to a constant in this project
2327
+ # @sg-ignore
2328
+ #
2329
+ # _@param_ `workspace_name`
2330
+ #
2331
+ # _@param_ `custom_field_name`
2332
+ sig { params(workspace_name: String, custom_field_name: String).returns(T.nilable(Asana::Resources::CustomField)) }
2333
+ def custom_field(workspace_name, custom_field_name); end
2334
+
2335
+ # _@param_ `resource`
2336
+ #
2337
+ # _@param_ `custom_field_gid`
2338
+ sig { params(resource: T.any(Asana::Resources::Project, Asana::Resources::Task), custom_field_gid: String).returns(T::Array[String]) }
2339
+ def resource_custom_field_values_gids_or_raise(resource, custom_field_gid); end
2340
+
2341
+ # _@param_ `resource`
2342
+ #
2343
+ # _@param_ `custom_field_name`
2344
+ sig { params(resource: T.any(Asana::Resources::Project, Asana::Resources::Task), custom_field_name: String).returns(T::Array[String]) }
2345
+ def resource_custom_field_values_names_by_name(resource, custom_field_name); end
2346
+
2347
+ # @sg-ignore
2348
+ #
2349
+ # _@param_ `project`
2350
+ #
2351
+ # _@param_ `custom_field_name`
2352
+ sig { params(resource: T.untyped, custom_field_name: String).returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
2353
+ def resource_custom_field_by_name(resource, custom_field_name); end
2354
+
2355
+ # _@param_ `resource`
2356
+ #
2357
+ # _@param_ `custom_field_name`
2358
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), custom_field_name: String).returns(T::Hash[T.untyped, T.untyped]) }
2359
+ def resource_custom_field_by_name_or_raise(resource, custom_field_name); end
2360
+
2361
+ # _@param_ `resource`
2362
+ #
2363
+ # _@param_ `custom_field_gid`
2364
+ sig { params(resource: T.any(Asana::Resources::Project, Asana::Resources::Task), custom_field_gid: String).returns(T::Hash[T.untyped, T.untyped]) }
2365
+ def resource_custom_field_by_gid_or_raise(resource, custom_field_gid); end
2366
+
2367
+ # sord warn - "[Hash" does not appear to be a type
2368
+ # sord warn - "Array<Hash>]" does not appear to be a type
2369
+ # sord warn - Invalid hash, must have exactly two types: "Hash{String => [Hash,Array<Hash>]}".
2370
+ # @sg-ignore
2371
+ #
2372
+ # _@param_ `custom_field`
2373
+ sig { params(custom_field: T.untyped).returns(T::Array[T::Hash[T.untyped, T.untyped]]) }
2374
+ def resource_custom_field_enum_values(custom_field); end
2375
+
2376
+ # _@param_ `custom_field`
2377
+ #
2378
+ # _@param_ `enum_value`
2379
+ sig { params(custom_field: T::Hash[T.untyped, T.untyped], enum_value: T.nilable(T::Hash[String, String])).returns(T::Array[String]) }
2380
+ def find_gids(custom_field, enum_value); end
2381
+
2382
+ sig { void }
2383
+ def self.run; end
2384
+
2385
+ sig { returns(Checkoff::Workspaces) }
2386
+ attr_reader :workspaces
2387
+
2388
+ sig { returns(Asana::Client) }
2389
+ attr_reader :client
2390
+ end
2391
+
2392
+ # Run task searches against the Asana API
2393
+ class TaskSearches
2394
+ include Logging
2395
+ include Asana::Resources::ResponseHelper
2396
+ extend CacheMethod::ClassMethods
2397
+ MINUTE = T.let(60, T.untyped)
2398
+ HOUR = T.let(MINUTE * 60, T.untyped)
2399
+ DAY = T.let(24 * HOUR, T.untyped)
2400
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2401
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2402
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2403
+
2404
+ # sord warn - Asana::Resources::Collection wasn't able to be resolved to a constant in this project
2405
+ # _@param_ `config`
2406
+ #
2407
+ # _@param_ `workspaces`
2408
+ #
2409
+ # _@param_ `task_selectors`
2410
+ #
2411
+ # _@param_ `projects`
2412
+ #
2413
+ # _@param_ `clients`
2414
+ #
2415
+ # _@param_ `client`
2416
+ #
2417
+ # _@param_ `search_url_parser`
2418
+ #
2419
+ # _@param_ `asana_resources_collection_class`
2420
+ sig do
2421
+ params(
2422
+ config: T::Hash[Symbol, Object],
2423
+ workspaces: Checkoff::Workspaces,
2424
+ task_selectors: Checkoff::TaskSelectors,
2425
+ projects: Checkoff::Projects,
2426
+ clients: Checkoff::Clients,
2427
+ client: Asana::Client,
2428
+ search_url_parser: Checkoff::Internal::SearchUrl::Parser,
2429
+ asana_resources_collection_class: T.class_of(Asana::Resources::Collection)
2430
+ ).void
2431
+ end
2432
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), task_selectors: Checkoff::TaskSelectors.new(config: config), projects: Checkoff::Projects.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client, search_url_parser: Checkoff::Internal::SearchUrl::Parser.new, asana_resources_collection_class: Asana::Resources::Collection); end
2433
+
2434
+ # Perform an equivalent search API to an Asana search URL in the
2435
+ # web UI. Not all URL parameters are supported; each one must be
2436
+ # added here manually. In addition, not all are supported in the
2437
+ # Asana API in a compatible way, so they may result in more tasks
2438
+ # being fetched than actually returned as filtering is done
2439
+ # manually.
2440
+ #
2441
+ # _@param_ `workspace_name`
2442
+ #
2443
+ # _@param_ `url`
2444
+ #
2445
+ # _@param_ `extra_fields`
2446
+ sig { params(workspace_name: String, url: String, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Task]) }
2447
+ def task_search(workspace_name, url, extra_fields: []); end
2448
+
2449
+ # Perform a search using the Asana Task Search API:
2450
+ #
2451
+ # https://developers.asana.com/reference/searchtasksforworkspace
2452
+ #
2453
+ # _@param_ `api_params`
2454
+ #
2455
+ # _@param_ `workspace_gid`
2456
+ #
2457
+ # _@param_ `extra_fields`
2458
+ #
2459
+ # _@param_ `task_selector`
2460
+ #
2461
+ # _@param_ `fetch_all` — Ensure all results are provided by manually paginating
2462
+ sig do
2463
+ params(
2464
+ api_params: T::Hash[String, Object],
2465
+ workspace_gid: String,
2466
+ extra_fields: T::Array[String],
2467
+ task_selector: T::Array[T.untyped],
2468
+ fetch_all: T::Boolean
2469
+ ).returns(T::Enumerable[Asana::Resources::Task])
2470
+ end
2471
+ def raw_task_search(api_params, workspace_gid:, extra_fields: [], task_selector: [], fetch_all: true); end
2472
+
2473
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
2474
+ def as_cache_key; end
2475
+
2476
+ # Perform a search using the Asana Task Search API:
2477
+ #
2478
+ # https://developers.asana.com/reference/searchtasksforworkspace
2479
+ #
2480
+ # _@param_ `api_params`
2481
+ #
2482
+ # _@param_ `workspace_gid`
2483
+ #
2484
+ # _@param_ `extra_fields`
2485
+ sig { params(api_params: T::Hash[String, Object], workspace_gid: String, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Task]) }
2486
+ def api_task_search_request(api_params, workspace_gid:, extra_fields:); end
2487
+
2488
+ # Perform a search using the Asana Task Search API and use manual pagination to
2489
+ # ensure all results are returned:
2490
+ #
2491
+ # https://developers.asana.com/reference/searchtasksforworkspace
2492
+ #
2493
+ # "However, you can paginate manually by sorting the search
2494
+ # results by their creation time and then modifying each
2495
+ # subsequent query to exclude data you have already seen." -
2496
+ # see sort_by field at
2497
+ # https://developers.asana.com/reference/searchtasksforworkspace
2498
+ #
2499
+ # _@param_ `api_params`
2500
+ #
2501
+ # _@param_ `workspace_gid`
2502
+ #
2503
+ # _@param_ `url`
2504
+ #
2505
+ # _@param_ `extra_fields`
2506
+ #
2507
+ # _@param_ `fetch_all` — Ensure all results are provided by manually paginating
2508
+ sig { params(api_params: T::Hash[String, Object], workspace_gid: String, extra_fields: T::Array[String]).returns(T::Enumerable[Asana::Resources::Task]) }
2509
+ def iterated_raw_task_search(api_params, workspace_gid:, extra_fields:); end
2510
+
2511
+ # _@param_ `extra_fields`
2512
+ sig { params(extra_fields: T::Array[String]).returns(T::Hash[String, Object]) }
2513
+ def calculate_api_options(extra_fields); end
2514
+
2515
+ sig { void }
2516
+ def self.run; end
2517
+
2518
+ sig { returns(::Logger) }
2519
+ def logger; end
2520
+
2521
+ # _@param_ `message`
2522
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2523
+ def error(message = nil, &block); end
2524
+
2525
+ # _@param_ `message`
2526
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2527
+ def warn(message = nil, &block); end
2528
+
2529
+ # _@param_ `message`
2530
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2531
+ def info(message = nil, &block); end
2532
+
2533
+ # _@param_ `message`
2534
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2535
+ def debug(message = nil, &block); end
2536
+
2537
+ # _@param_ `message`
2538
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
2539
+ def finer(message = nil, &block); end
2540
+
2541
+ # @sg-ignore
2542
+ sig { returns(Symbol) }
2543
+ def log_level; end
2544
+
2545
+ sig { returns(Checkoff::TaskSelectors) }
2546
+ attr_reader :task_selectors
2547
+
2548
+ sig { returns(Checkoff::Projects) }
2549
+ attr_reader :projects
2550
+
2551
+ sig { returns(Checkoff::Workspaces) }
2552
+ attr_reader :workspaces
2553
+
2554
+ sig { returns(Asana::Client) }
2555
+ attr_reader :client
2556
+ end
2557
+
2558
+ # Filter lists of tasks using declarative selectors.
2559
+ class TaskSelectors
2560
+ MINUTE = T.let(60, T.untyped)
2561
+ HOUR = T.let(MINUTE * 60, T.untyped)
2562
+ DAY = T.let(24 * HOUR, T.untyped)
2563
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2564
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2565
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2566
+
2567
+ # @sg-ignore
2568
+ #
2569
+ # _@param_ `config`
2570
+ #
2571
+ # _@param_ `client`
2572
+ #
2573
+ # _@param_ `tasks`
2574
+ #
2575
+ # _@param_ `timelines`
2576
+ sig do
2577
+ params(
2578
+ config: T::Hash[T.untyped, T.untyped],
2579
+ client: Asana::Client,
2580
+ tasks: Checkoff::Tasks,
2581
+ timelines: Checkoff::Timelines,
2582
+ custom_fields: T.untyped
2583
+ ).void
2584
+ end
2585
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), client: Checkoff::Clients.new(config: config).client, tasks: Checkoff::Tasks.new(config: config,
2586
+ client: client), timelines: Checkoff::Timelines.new(config: config,
2587
+ client: client), custom_fields: Checkoff::CustomFields.new(config: config,
2588
+ client: client)); end
2589
+
2590
+ # _@param_ `task`
2591
+ #
2592
+ # _@param_ `task_selector` — Filter based on task details. Examples: [:tag, 'foo'] [:not, [:tag, 'foo']] [:tag, 'foo']
2593
+ sig { params(task: Asana::Resources::Task, task_selector: T::Array[[Symbol, T::Array[T.untyped]]]).returns(T::Boolean) }
2594
+ def filter_via_task_selector(task, task_selector); end
2595
+
2596
+ # @sg-ignore
2597
+ sig { returns(String) }
2598
+ def self.project_name; end
2599
+
2600
+ # @sg-ignore
2601
+ sig { returns(String) }
2602
+ def self.workspace_name; end
2603
+
2604
+ sig { returns(T::Array[T.untyped]) }
2605
+ def self.task_selector; end
2606
+
2607
+ sig { void }
2608
+ def self.run; end
2609
+
2610
+ sig { returns(Checkoff::Tasks) }
2611
+ attr_reader :tasks
2612
+
2613
+ sig { returns(Checkoff::Timelines) }
2614
+ attr_reader :timelines
2615
+
2616
+ sig { returns(Checkoff::CustomFields) }
2617
+ attr_reader :custom_fields
2618
+ end
2619
+
2620
+ # Filter lists of projects using declarative selectors.
2621
+ class ProjectSelectors
2622
+ MINUTE = T.let(60, T.untyped)
2623
+ HOUR = T.let(MINUTE * 60, T.untyped)
2624
+ DAY = T.let(24 * HOUR, T.untyped)
2625
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2626
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2627
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2628
+
2629
+ # _@param_ `config`
2630
+ #
2631
+ # _@param_ `workspaces`
2632
+ #
2633
+ # _@param_ `projects`
2634
+ #
2635
+ # _@param_ `custom_fields`
2636
+ #
2637
+ # _@param_ `portfolios`
2638
+ #
2639
+ # _@param_ `clients`
2640
+ #
2641
+ # _@param_ `client`
2642
+ sig do
2643
+ params(
2644
+ config: T::Hash[Symbol, Object],
2645
+ workspaces: Checkoff::Workspaces,
2646
+ projects: Checkoff::Projects,
2647
+ custom_fields: Checkoff::CustomFields,
2648
+ portfolios: Checkoff::Portfolios,
2649
+ clients: Checkoff::Clients,
2650
+ client: Asana::Client
2651
+ ).void
2652
+ end
2653
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), projects: Checkoff::Projects.new(config: config), custom_fields: Checkoff::CustomFields.new(config: config), portfolios: Checkoff::Portfolios.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client); end
2654
+
2655
+ # _@param_ `project`
2656
+ #
2657
+ # _@param_ `project_selector` — Filter based on project details. Examples: [:tag, 'foo'] [:not, [:tag, 'foo']] [:tag, 'foo']
2658
+ sig { params(project: Asana::Resources::Project, project_selector: T::Array[[Symbol, T::Array[T.untyped]]]).returns(T::Boolean) }
2659
+ def filter_via_project_selector(project, project_selector); end
2660
+
2661
+ sig { void }
2662
+ def self.run; end
2663
+
2664
+ sig { returns(Checkoff::Workspaces) }
2665
+ attr_reader :workspaces
2666
+
2667
+ sig { returns(Checkoff::Projects) }
2668
+ attr_reader :projects
2669
+
2670
+ sig { returns(Checkoff::CustomFields) }
2671
+ attr_reader :custom_fields
2672
+
2673
+ sig { returns(Checkoff::Portfolios) }
2674
+ attr_reader :portfolios
2675
+
2676
+ sig { returns(Asana::Client) }
2677
+ attr_reader :client
2678
+ end
2679
+
2680
+ # Filter lists of sections using declarative selectors.
2681
+ class SectionSelectors
2682
+ MINUTE = T.let(60, T.untyped)
2683
+ HOUR = T.let(MINUTE * 60, T.untyped)
2684
+ DAY = T.let(24 * HOUR, T.untyped)
2685
+ REALLY_LONG_CACHE_TIME = T.let(HOUR * 1, T.untyped)
2686
+ LONG_CACHE_TIME = T.let(MINUTE * 15, T.untyped)
2687
+ SHORT_CACHE_TIME = T.let(MINUTE, T.untyped)
2688
+
2689
+ # _@param_ `config`
2690
+ #
2691
+ # _@param_ `workspaces`
2692
+ #
2693
+ # _@param_ `sections`
2694
+ #
2695
+ # _@param_ `custom_fields`
2696
+ #
2697
+ # _@param_ `clients`
2698
+ #
2699
+ # _@param_ `client`
2700
+ sig do
2701
+ params(
2702
+ config: T::Hash[Symbol, Object],
2703
+ workspaces: Checkoff::Workspaces,
2704
+ sections: Checkoff::Sections,
2705
+ custom_fields: Checkoff::CustomFields,
2706
+ clients: Checkoff::Clients,
2707
+ client: Asana::Client
2708
+ ).void
2709
+ end
2710
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), sections: Checkoff::Sections.new(config: config), custom_fields: Checkoff::CustomFields.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client); end
2711
+
2712
+ # _@param_ `section`
2713
+ #
2714
+ # _@param_ `section_selector` — Filter based on section details. Examples: [:tag, 'foo'] [:not, [:tag, 'foo']] [:tag, 'foo']
2715
+ sig { params(section: Asana::Resources::Section, section_selector: T::Array[[Symbol, T::Array[T.untyped]]]).returns(T::Boolean) }
2716
+ def filter_via_section_selector(section, section_selector); end
2717
+
2718
+ sig { void }
2719
+ def self.run; end
2720
+
2721
+ sig { returns(Checkoff::Workspaces) }
2722
+ attr_reader :workspaces
2723
+
2724
+ sig { returns(Checkoff::Sections) }
2725
+ attr_reader :sections
2726
+
2727
+ sig { returns(Checkoff::CustomFields) }
2728
+ attr_reader :custom_fields
2729
+
2730
+ sig { returns(Asana::Client) }
2731
+ attr_reader :client
2732
+ end
2733
+
2734
+ module Internal
2735
+ # Builds on the standard API representation of an Asana task with some
2736
+ # convenience keys.
2737
+ class TaskHashes
2738
+ # _@param_ `task`
2739
+ sig { params(task: Asana::Resources::Task).returns(T::Hash[T.untyped, T.untyped]) }
2740
+ def task_to_h(task); end
2741
+
2742
+ # _@param_ `task_data`
2743
+ #
2744
+ # _@param_ `client`
2745
+ sig { params(task_data: T::Hash[T.untyped, T.untyped], client: Asana::Client).returns(Asana::Resources::Task) }
2746
+ def h_to_task(task_data, client:); end
2747
+
2748
+ # _@param_ `task_hash`
2749
+ sig { params(task_hash: T::Hash[T.untyped, T.untyped]).void }
2750
+ def unwrap_custom_fields(task_hash); end
2751
+
2752
+ # sord warn - Invalid hash, must have exactly two types: "Hash<String, Hash, Array>".
2753
+ # _@param_ `task_hash`
2754
+ #
2755
+ # _@param_ `memberships`
2756
+ sig { params(task_hash: T.untyped, memberships: T::Array[T::Hash[T.untyped, T.untyped]]).void }
2757
+ def add_user_task_list(task_hash, memberships); end
2758
+
2759
+ # _@param_ `task_hash`
2760
+ #
2761
+ # _@param_ `resource`
2762
+ #
2763
+ # _@param_ `memberships`
2764
+ #
2765
+ # _@param_ `key`
2766
+ sig do
2767
+ params(
2768
+ task_hash: T::Hash[T.untyped, T.untyped],
2769
+ memberships: T::Array[T::Hash[T.untyped, T.untyped]],
2770
+ resource: String,
2771
+ key: String
2772
+ ).void
2773
+ end
2774
+ def unwrap_memberships(task_hash, memberships, resource, key); end
2775
+
2776
+ # _@param_ `task_hash`
2777
+ sig { params(task_hash: T::Hash[T.untyped, T.untyped]).void }
2778
+ def unwrap_all_memberships(task_hash); end
2779
+ end
2780
+
2781
+ # Utility methods for working with task dates and times
2782
+ class TaskTiming
2783
+ # _@param_ `time_class`
2784
+ #
2785
+ # _@param_ `date_class`
2786
+ #
2787
+ # _@param_ `client`
2788
+ #
2789
+ # _@param_ `custom_fields`
2790
+ sig do
2791
+ params(
2792
+ time_class: T.class_of(Time),
2793
+ date_class: T.class_of(Date),
2794
+ client: Asana::Client,
2795
+ custom_fields: Checkoff::CustomFields
2796
+ ).void
2797
+ end
2798
+ def initialize(time_class: Time, date_class: Date, client: Checkoff::Clients.new.client, custom_fields: Checkoff::CustomFields.new(client: client)); end
2799
+
2800
+ # _@param_ `task`
2801
+ sig { params(task: Asana::Resources::Task).returns(T.nilable(Time)) }
2802
+ def start_time(task); end
2803
+
2804
+ # _@param_ `task`
2805
+ sig { params(task: Asana::Resources::Task).returns(T.nilable(Time)) }
2806
+ def due_time(task); end
2807
+
2808
+ # @sg-ignore
2809
+ #
2810
+ # _@param_ `task`
2811
+ #
2812
+ # _@param_ `field_name`
2813
+ sig { params(task: Asana::Resources::Task).returns(T.nilable(T.any(Date, Time))) }
2814
+ def start_date_or_time(task); end
2815
+
2816
+ # @sg-ignore
2817
+ #
2818
+ # _@param_ `task`
2819
+ #
2820
+ # _@param_ `field_name`
2821
+ sig { params(task: Asana::Resources::Task).returns(T.nilable(T.any(Date, Time))) }
2822
+ def due_date_or_time(task); end
2823
+
2824
+ # _@param_ `task`
2825
+ sig { params(task: Asana::Resources::Task).returns(T.nilable(Time)) }
2826
+ def modified_time(task); end
2827
+
2828
+ # _@param_ `task`
2829
+ #
2830
+ # _@param_ `custom_field_name`
2831
+ sig { params(task: Asana::Resources::Task, custom_field_name: String).returns(T.nilable(T.any(Time, Date))) }
2832
+ def custom_field(task, custom_field_name); end
2833
+
2834
+ # @sg-ignore
2835
+ #
2836
+ # _@param_ `task`
2837
+ #
2838
+ # _@param_ `field_name`
2839
+ sig { params(task: Asana::Resources::Task, field_name: T.any(Symbol, T::Array[T.untyped])).returns(T.nilable(T.any(Date, Time))) }
2840
+ def date_or_time_field_by_name(task, field_name); end
2841
+ end
2842
+
2843
+ # Manage thread lock variables in a block
2844
+ class ThreadLocal
2845
+ # @sg-ignore
2846
+ #
2847
+ # _@param_ `name`
2848
+ #
2849
+ # _@param_ `value`
2850
+ sig { params(name: Symbol, value: T.any(Object, T::Boolean), block: T.untyped).returns(T.any(Object, T::Boolean)) }
2851
+ def with_thread_local_variable(name, value, &block); end
2852
+ end
2853
+
2854
+ # Use the provided config from a YAML file, and fall back to env
2855
+ # variable if it's not populated for a key'
2856
+ class EnvFallbackConfigLoader
2857
+ # _@param_ `config`
2858
+ #
2859
+ # _@param_ `sym`
2860
+ #
2861
+ # _@param_ `yaml_filename`
2862
+ sig { params(config: T::Hash[Symbol, Object], sym: Symbol, yaml_filename: String).void }
2863
+ def initialize(config, sym, yaml_filename); end
2864
+
2865
+ # _@param_ `key`
2866
+ sig { params(key: Symbol).returns(Object) }
2867
+ def [](key); end
2868
+
2869
+ # _@param_ `key`
2870
+ sig { params(key: Symbol).returns(Object) }
2871
+ def fetch(key); end
2872
+
2873
+ # _@param_ `key`
2874
+ sig { params(key: Symbol).returns(String) }
2875
+ def envvar_name(key); end
2876
+ end
2877
+
2878
+ # Load configuration file
2879
+ class ConfigLoader
2880
+ sig { params(sym: T.untyped).returns(EnvFallbackConfigLoader) }
2881
+ def self.load(sym); end
2882
+
2883
+ # sord warn - "[String" does not appear to be a type
2884
+ # sord warn - "Symbol]" does not appear to be a type
2885
+ # sord warn - Invalid hash, must have exactly two types: "Hash<[String, Symbol], Object>".
2886
+ # _@param_ `sym`
2887
+ sig { params(sym: Symbol).returns(T.untyped) }
2888
+ def self.load_yaml_file(sym); end
2889
+
2890
+ # _@param_ `sym`
2891
+ sig { params(sym: Symbol).returns(String) }
2892
+ def self.yaml_filename(sym); end
2893
+ end
2894
+
2895
+ # Builds on the standard API representation of an Asana project with some
2896
+ # convenience keys.
2897
+ class ProjectHashes
2898
+ # _@param_ `_deps`
2899
+ sig { params(_deps: T::Hash[T.untyped, T.untyped]).void }
2900
+ def initialize(_deps = {}); end
2901
+
2902
+ # _@param_ `project_obj`
2903
+ #
2904
+ # _@param_ `project` — - :not_specified, :my_tasks
2905
+ sig { params(project_obj: Asana::Resources::Project, project: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) }
2906
+ def project_to_h(project_obj, project: :not_specified); end
2907
+
2908
+ # _@param_ `project_hash`
2909
+ sig { params(project_hash: T::Hash[T.untyped, T.untyped]).void }
2910
+ def unwrap_custom_fields(project_hash); end
2911
+ end
2912
+
2913
+ # Utility methods for working with project dates and times
2914
+ class ProjectTiming
2915
+ # _@param_ `time_class`
2916
+ #
2917
+ # _@param_ `date_class`
2918
+ #
2919
+ # _@param_ `client`
2920
+ #
2921
+ # _@param_ `custom_fields`
2922
+ sig do
2923
+ params(
2924
+ time_class: T.class_of(Time),
2925
+ date_class: T.class_of(Date),
2926
+ client: Asana::Client,
2927
+ custom_fields: Checkoff::CustomFields
2928
+ ).void
2929
+ end
2930
+ def initialize(time_class: Time, date_class: Date, client: Checkoff::Clients.new.client, custom_fields: Checkoff::CustomFields.new(client: client)); end
2931
+
2932
+ # @sg-ignore
2933
+ #
2934
+ # _@param_ `project`
2935
+ #
2936
+ # _@param_ `field_name`
2937
+ sig { params(project: Asana::Resources::Project).returns(T.nilable(Date)) }
2938
+ def start_date(project); end
2939
+
2940
+ # @sg-ignore
2941
+ #
2942
+ # _@param_ `project`
2943
+ #
2944
+ # _@param_ `field_name`
2945
+ sig { params(project: Asana::Resources::Project).returns(T.nilable(Date)) }
2946
+ def due_date(project); end
2947
+
2948
+ # _@param_ `project`
2949
+ #
2950
+ # _@param_ `custom_field_name`
2951
+ sig { params(project: Asana::Resources::Project, custom_field_name: String).returns(T.nilable(T.any(Time, Date))) }
2952
+ def custom_field(project, custom_field_name); end
2953
+
2954
+ # @sg-ignore
2955
+ #
2956
+ # _@param_ `project`
2957
+ #
2958
+ # _@param_ `field_name`
2959
+ sig { params(project: Asana::Resources::Project, field_name: T.any(Symbol, T::Array[T.untyped])).returns(T.nilable(T.any(Date, Time))) }
2960
+ def date_or_time_field_by_name(project, field_name); end
2961
+ end
2962
+
2963
+ module SearchUrl
2964
+ # Parse Asana search URLs into parameters suitable to pass into
2965
+ # the /workspaces/{workspace_gid}/tasks/search endpoint
2966
+ class Parser
2967
+ # _@param_ `_deps`
2968
+ sig { params(_deps: T::Hash[T.untyped, T.untyped]).void }
2969
+ def initialize(_deps = {}); end
2970
+
2971
+ # _@param_ `url`
2972
+ sig { params(url: String).returns([T::Hash[String, String], T::Hash[String, String]]) }
2973
+ def convert_params(url); end
2974
+
2975
+ # sord warn - "[Symbol" does not appear to be a type
2976
+ # sord warn - "Array]" does not appear to be a type
2977
+ # _@param_ `date_url_params`
2978
+ sig { params(date_url_params: T::Hash[String, T::Array[String]]).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
2979
+ def convert_date_params(date_url_params); end
2980
+
2981
+ # _@param_ `simple_url_params`
2982
+ sig { params(simple_url_params: T::Hash[String, T::Array[String]]).returns(T::Hash[String, String]) }
2983
+ def convert_simple_params(simple_url_params); end
2984
+
2985
+ # sord warn - "[Symbol" does not appear to be a type
2986
+ # sord warn - "Array]" does not appear to be a type
2987
+ # _@param_ `custom_field_params`
2988
+ sig { params(custom_field_params: T::Hash[String, T::Array[String]]).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
2989
+ def convert_custom_field_params(custom_field_params); end
2990
+
2991
+ # _@param_ `url_params`
2992
+ sig { params(url_params: T::Hash[String, String]).returns([T::Hash[String, String], T::Hash[String, String], T::Hash[String, String]]) }
2993
+ def partition_url_params(url_params); end
2994
+ end
2995
+
2996
+ # Merge task selectors and search API arguments
2997
+ class ResultsMerger
2998
+ # sord warn - "[Hash<String, String>]" does not appear to be a type
2999
+ # _@param_ `args`
3000
+ #
3001
+ # _@return_ — Hash<String, String>
3002
+ sig { params(args: T::Array[T.untyped]).returns(T::Hash[String, String]) }
3003
+ def self.merge_args(*args); end
3004
+
3005
+ # sord warn - "[Symbol" does not appear to be a type
3006
+ # sord warn - "Array]" does not appear to be a type
3007
+ # sord warn - "[Symbol" does not appear to be a type
3008
+ # sord warn - "Array]" does not appear to be a type
3009
+ # _@param_ `task_selectors`
3010
+ sig { params(task_selectors: T::Array[T::Array[T.any(T.untyped, T.untyped)]]).returns(T::Array[T.any(T.untyped, T.untyped)]) }
3011
+ def self.merge_task_selectors(*task_selectors); end
3012
+ end
3013
+
3014
+ # https://developers.asana.com/docs/search-tasks-in-a-workspace
3015
+ module CustomFieldVariant
3016
+ # base class for handling different custom_field_#{gid}.variant params
3017
+ class CustomFieldVariant
3018
+ # _@param_ `gid`
3019
+ #
3020
+ # _@param_ `remaining_params`
3021
+ sig { params(gid: String, remaining_params: T::Hash[T.untyped, T.untyped]).void }
3022
+ def initialize(gid, remaining_params); end
3023
+
3024
+ sig { void }
3025
+ def ensure_no_remaining_params!; end
3026
+
3027
+ # _@param_ `param_name`
3028
+ sig { params(param_name: String).returns(String) }
3029
+ def fetch_solo_param(param_name); end
3030
+
3031
+ sig { returns(String) }
3032
+ attr_reader :gid
3033
+
3034
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
3035
+ attr_reader :remaining_params
3036
+ end
3037
+
3038
+ # custom_field_#{gid}.variant = 'less_than'
3039
+ class LessThan < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3040
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3041
+ def convert; end
3042
+ end
3043
+
3044
+ # custom_field_#{gid}.variant = 'greater_than'
3045
+ class GreaterThan < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3046
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3047
+ def convert; end
3048
+ end
3049
+
3050
+ # custom_field_#{gid}.variant = 'equals'
3051
+ class Equals < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3052
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3053
+ def convert; end
3054
+ end
3055
+
3056
+ # This is used in the UI for select fields
3057
+ #
3058
+ # custom_field_#{gid}.variant = 'is_not'
3059
+ class IsNot < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3060
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3061
+ def convert; end
3062
+ end
3063
+
3064
+ # This is used in the UI for multi-select fields
3065
+ #
3066
+ # custom_field_#{gid}.variant = 'doesnt_contain_any'
3067
+ class DoesntContainAny < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3068
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3069
+ def convert; end
3070
+ end
3071
+
3072
+ # This is used in the UI for multi-select fields
3073
+ #
3074
+ # custom_field_#{gid}.variant = 'contains_any'
3075
+ class ContainsAny < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3076
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3077
+ def convert; end
3078
+ end
3079
+
3080
+ # This is used in the UI for multi-select fields
3081
+ #
3082
+ # custom_field_#{gid}.variant = 'contains_all'
3083
+ class ContainsAll < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3084
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3085
+ def convert; end
3086
+ end
3087
+
3088
+ # custom_field_#{gid}.variant = 'no_value'
3089
+ class NoValue < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3090
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3091
+ def convert; end
3092
+ end
3093
+
3094
+ # custom_field_#{gid}.variant = 'any_value'
3095
+ #
3096
+ # Not used for multi-select fields
3097
+ class AnyValue < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3098
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3099
+ def convert; end
3100
+ end
3101
+
3102
+ # custom_field_#{gid}.variant = 'is'
3103
+ class Is < Checkoff::Internal::SearchUrl::CustomFieldVariant::CustomFieldVariant
3104
+ sig { returns(T::Array[[T::Hash[T.untyped, T.untyped], T::Array[T.untyped]]]) }
3105
+ def convert; end
3106
+ end
3107
+ end
3108
+
3109
+ # Convert date parameters - ones where the param name itself
3110
+ # doesn't encode any parameters'
3111
+ class DateParamConverter
3112
+ API_PREFIX = T.let({
3113
+ 'due_date' => 'due_on',
3114
+ 'start_date' => 'start_on',
3115
+ 'completion_date' => 'completed_on',
3116
+ }.freeze, T.untyped)
3117
+
3118
+ # _@param_ `date_url_params` — the simple params
3119
+ sig { params(date_url_params: T::Hash[String, T::Array[String]]).void }
3120
+ def initialize(date_url_params:); end
3121
+
3122
+ # sord warn - "[Symbol" does not appear to be a type
3123
+ # sord warn - "Array]" does not appear to be a type
3124
+ # @sg-ignore
3125
+ sig { returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3126
+ def convert; end
3127
+
3128
+ # sord warn - "[Symbol" does not appear to be a type
3129
+ # sord warn - "Array]" does not appear to be a type
3130
+ # @sg-ignore
3131
+ #
3132
+ # _@param_ `prefix`
3133
+ sig { params(prefix: String).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3134
+ def convert_for_prefix(prefix); end
3135
+
3136
+ # sord warn - "[Symbol" does not appear to be a type
3137
+ # sord warn - "Array]" does not appear to be a type
3138
+ # _@param_ `prefix`
3139
+ #
3140
+ # _@return_ — See https://developers.asana.com/docs/search-tasks-in-a-workspace
3141
+ sig { params(prefix: String).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3142
+ def handle_through_next(prefix); end
3143
+
3144
+ # sord warn - "[Symbol" does not appear to be a type
3145
+ # sord warn - "Array]" does not appear to be a type
3146
+ # _@param_ `prefix`
3147
+ #
3148
+ # _@return_ — See https://developers.asana.com/docs/search-tasks-in-a-workspace
3149
+ sig { params(prefix: String).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3150
+ def handle_between(prefix); end
3151
+
3152
+ # sord warn - "[Symbol" does not appear to be a type
3153
+ # sord warn - "Array]" does not appear to be a type
3154
+ # _@param_ `prefix`
3155
+ #
3156
+ # _@return_ — See https://developers.asana.com/docs/search-tasks-in-a-workspace
3157
+ sig { params(prefix: String).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3158
+ def handle_within_last(prefix); end
3159
+
3160
+ # sord warn - "[Symbol" does not appear to be a type
3161
+ # sord warn - "Array]" does not appear to be a type
3162
+ # _@param_ `prefix`
3163
+ #
3164
+ # _@return_ — See https://developers.asana.com/docs/search-tasks-in-a-workspace
3165
+ sig { params(prefix: String).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3166
+ def handle_within_next(prefix); end
3167
+
3168
+ # _@param_ `param_key`
3169
+ sig { params(param_key: String).returns(String) }
3170
+ def get_single_param(param_key); end
3171
+
3172
+ # _@param_ `prefix`
3173
+ sig { params(prefix: String).void }
3174
+ def validate_unit_not_provided!(prefix); end
3175
+
3176
+ # _@param_ `prefix`
3177
+ sig { params(prefix: String).void }
3178
+ def validate_unit_is_day!(prefix); end
3179
+
3180
+ sig { returns(T::Hash[String, T::Array[String]]) }
3181
+ attr_reader :date_url_params
3182
+ end
3183
+
3184
+ # See
3185
+ # https://developers.asana.com/docs/search-tasks-in-a-workspace
3186
+ # for the return value of 'convert' here:
3187
+ module SimpleParam
3188
+ # base class for handling different types of search url params
3189
+ class SimpleParam
3190
+ # _@param_ `key` — the name of the search url param
3191
+ #
3192
+ # _@param_ `values` — the values of the search url param
3193
+ sig { params(key: String, values: T::Array[String]).void }
3194
+ def initialize(key:, values:); end
3195
+
3196
+ # @sg-ignore
3197
+ #
3198
+ # _@return_ — the single value of the search url param
3199
+ sig { returns(String) }
3200
+ def single_value; end
3201
+
3202
+ # Inputs:
3203
+ # 123_column_456 means "abc" project, "def" section
3204
+ # 123 means "abc" project
3205
+ # 123~456 means "abc" and "def" projects
3206
+ #
3207
+ # _@param_ `projects`
3208
+ #
3209
+ # _@param_ `sections`
3210
+ sig { params(projects: T::Array[String], sections: T::Array[String]).void }
3211
+ def parse_projects_and_sections(projects, sections); end
3212
+
3213
+ # _@param_ `verb`
3214
+ sig { params(verb: String).returns(T::Array[String]) }
3215
+ def convert_from_projects_and_sections(verb); end
3216
+
3217
+ sig { returns(String) }
3218
+ attr_reader :key
3219
+
3220
+ sig { returns(T::Array[String]) }
3221
+ attr_reader :values
3222
+ end
3223
+
3224
+ # Handle 'portfolios.ids' search url param
3225
+ class PortfoliosIds < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3226
+ sig { returns(T::Array[String]) }
3227
+ def convert; end
3228
+ end
3229
+
3230
+ # Handle 'any_projects.ids' search url param
3231
+ class AnyProjectsIds < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3232
+ sig { returns(T::Array[String]) }
3233
+ def convert; end
3234
+ end
3235
+
3236
+ # Handle 'not_projects.ids' search url param
3237
+ class NotProjectsIds < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3238
+ sig { returns(T::Array[String]) }
3239
+ def convert; end
3240
+ end
3241
+
3242
+ # Handle 'completion' search url param
3243
+ class Completion < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3244
+ sig { returns(T::Array[String]) }
3245
+ def convert; end
3246
+ end
3247
+
3248
+ # Handle 'not_tags.ids' search url param
3249
+ class NotTagsIds < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3250
+ sig { returns(T::Array[String]) }
3251
+ def convert; end
3252
+ end
3253
+
3254
+ # handle 'subtask' search url param
3255
+ class Subtask < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3256
+ # sord warn - "[String" does not appear to be a type
3257
+ # sord warn - "Boolean]" does not appear to be a type
3258
+ sig { returns(T::Array[T.any(T.untyped, T.untyped)]) }
3259
+ def convert; end
3260
+ end
3261
+
3262
+ # Handle 'any_tags.ids' search url param
3263
+ class AnyTagsIds < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3264
+ sig { returns(T::Array[String]) }
3265
+ def convert; end
3266
+ end
3267
+
3268
+ # Handle 'sort' search url param
3269
+ class Sort < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3270
+ sig { returns(T::Array[String]) }
3271
+ def convert; end
3272
+ end
3273
+
3274
+ # Handle 'milestone' search url param
3275
+ class Milestone < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3276
+ sig { returns(T::Array[String]) }
3277
+ def convert; end
3278
+ end
3279
+
3280
+ # Handle 'searched_type' search url param
3281
+ class SearchedType < Checkoff::Internal::SearchUrl::SimpleParam::SimpleParam
3282
+ sig { returns(T::Array[String]) }
3283
+ def convert; end
3284
+ end
3285
+ end
3286
+
3287
+ # Convert simple parameters - ones where the param name itself
3288
+ # doesn't encode any parameters'
3289
+ class SimpleParamConverter
3290
+ ARGS = T.let({
3291
+ 'portfolios.ids' => SimpleParam::PortfoliosIds,
3292
+ 'any_projects.ids' => SimpleParam::AnyProjectsIds,
3293
+ 'not_projects.ids' => SimpleParam::NotProjectsIds,
3294
+ 'completion' => SimpleParam::Completion,
3295
+ 'not_tags.ids' => SimpleParam::NotTagsIds,
3296
+ 'any_tags.ids' => SimpleParam::AnyTagsIds,
3297
+ 'subtask' => SimpleParam::Subtask,
3298
+ 'sort' => SimpleParam::Sort,
3299
+ 'milestone' => SimpleParam::Milestone,
3300
+ 'searched_type' => SimpleParam::SearchedType,
3301
+ }.freeze, T.untyped)
3302
+
3303
+ # _@param_ `simple_url_params` — the simple params
3304
+ sig { params(simple_url_params: T::Hash[String, T::Array[String]]).void }
3305
+ def initialize(simple_url_params:); end
3306
+
3307
+ # _@return_ — the converted params
3308
+ sig { returns(T::Hash[String, String]) }
3309
+ def convert; end
3310
+
3311
+ # https://developers.asana.com/docs/search-tasks-in-a-workspace
3312
+ # @sg-ignore
3313
+ #
3314
+ # _@param_ `key` — the name of the search url param
3315
+ #
3316
+ # _@param_ `values` — the values of the search url param
3317
+ #
3318
+ # _@return_ — the converted params
3319
+ sig { params(key: String, values: T::Array[String]).returns(T::Hash[String, String]) }
3320
+ def convert_arg(key, values); end
3321
+
3322
+ sig { returns(T::Hash[String, T::Array[String]]) }
3323
+ attr_reader :simple_url_params
3324
+ end
3325
+
3326
+ # Convert custom field parameters from an Asana search URL into
3327
+ # API search arguments and Checkoff task selectors
3328
+ class CustomFieldParamConverter
3329
+ VARIANTS = T.let({
3330
+ 'is' => CustomFieldVariant::Is,
3331
+ 'no_value' => CustomFieldVariant::NoValue,
3332
+ 'any_value' => CustomFieldVariant::AnyValue,
3333
+ 'is_not' => CustomFieldVariant::IsNot,
3334
+ 'less_than' => CustomFieldVariant::LessThan,
3335
+ 'greater_than' => CustomFieldVariant::GreaterThan,
3336
+ 'equals' => CustomFieldVariant::Equals,
3337
+ 'doesnt_contain_any' => CustomFieldVariant::DoesntContainAny,
3338
+ 'contains_any' => CustomFieldVariant::ContainsAny,
3339
+ 'contains_all' => CustomFieldVariant::ContainsAll,
3340
+ }.freeze, T.untyped)
3341
+
3342
+ # _@param_ `custom_field_params`
3343
+ sig { params(custom_field_params: T::Hash[String, T::Array[String]]).void }
3344
+ def initialize(custom_field_params:); end
3345
+
3346
+ # sord warn - "[Symbol" does not appear to be a type
3347
+ # sord warn - "Array]" does not appear to be a type
3348
+ sig { returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3349
+ def convert; end
3350
+
3351
+ # @sg-ignore
3352
+ sig { returns(T::Hash[String, T::Hash[T.untyped, T.untyped]]) }
3353
+ def by_custom_field; end
3354
+
3355
+ # sord warn - "[Symbol" does not appear to be a type
3356
+ # sord warn - "Array]" does not appear to be a type
3357
+ # @sg-ignore
3358
+ #
3359
+ # _@param_ `gid`
3360
+ #
3361
+ # _@param_ `single_custom_field_params`
3362
+ sig { params(gid: String, single_custom_field_params: T::Hash[String, T::Array[String]]).returns([T::Hash[String, String], T::Array[T.any(T.untyped, T.untyped)]]) }
3363
+ def convert_single_custom_field_params(gid, single_custom_field_params); end
3364
+
3365
+ # _@param_ `key`
3366
+ sig { params(key: String).returns(String) }
3367
+ def gid_from_custom_field_key(key); end
3368
+
3369
+ sig { returns(T::Hash[String, T::Array[String]]) }
3370
+ attr_reader :custom_field_params
3371
+ end
3372
+ end
3373
+
3374
+ # Uses an enhanced version of Asana event filter configuration
3375
+ #
3376
+ # See https://developers.asana.com/reference/createwebhook | body
3377
+ # params | data | filters | add object for a general description of the scheme.
3378
+ #
3379
+ # Additional supported filter keys:
3380
+ #
3381
+ # * 'checkoff:parent.gid' - requires that the 'gid' key in the 'parent' object
3382
+ # match the given value
3383
+ class AsanaEventFilter
3384
+ include Logging
3385
+
3386
+ # _@param_ `filters` — The filters to match against
3387
+ #
3388
+ # _@param_ `clients`
3389
+ #
3390
+ # _@param_ `tasks`
3391
+ #
3392
+ # _@param_ `client`
3393
+ sig do
3394
+ params(
3395
+ filters: T.nilable(T::Array[T::Hash[T.untyped, T.untyped]]),
3396
+ clients: Checkoff::Clients,
3397
+ tasks: Checkoff::Tasks,
3398
+ client: Asana::Client
3399
+ ).void
3400
+ end
3401
+ def initialize(filters:, clients: Checkoff::Clients.new, tasks: Checkoff::Tasks.new, client: clients.client); end
3402
+
3403
+ # _@param_ `asana_event` — The event that Asana sent
3404
+ sig { params(asana_event: T::Hash[T.untyped, T.untyped]).returns(T::Boolean) }
3405
+ def matches?(asana_event); end
3406
+
3407
+ # @sg-ignore
3408
+ #
3409
+ # _@param_ `filter`
3410
+ #
3411
+ # _@param_ `asana_event`
3412
+ #
3413
+ # _@param_ `failures`
3414
+ sig { params(filter: T::Hash[T.untyped, T.untyped], asana_event: T::Hash[T.untyped, T.untyped], failures: T::Array[String]).returns(T::Boolean) }
3415
+ def filter_matches_asana_event?(filter, asana_event, failures); end
3416
+
3417
+ # @sg-ignore
3418
+ #
3419
+ # _@param_ `key`
3420
+ #
3421
+ # _@param_ `value`
3422
+ #
3423
+ # _@param_ `asana_event`
3424
+ sig { params(key: String, value: T.any(String, T::Array[String]), asana_event: T::Hash[T.untyped, T.untyped]).returns(T::Boolean) }
3425
+ def asana_event_matches_filter_item?(key, value, asana_event); end
3426
+
3427
+ # _@param_ `key`
3428
+ #
3429
+ # _@param_ `asana_event`
3430
+ #
3431
+ # _@param_ `fields`
3432
+ sig { params(key: String, asana_event: T::Hash[T.untyped, T.untyped], fields: T::Array[String]).returns(T.nilable(Asana::Resources::Task)) }
3433
+ def uncached_fetch_task(key, asana_event, fields); end
3434
+
3435
+ sig { returns(::Logger) }
3436
+ def logger; end
3437
+
3438
+ # _@param_ `message`
3439
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3440
+ def error(message = nil, &block); end
3441
+
3442
+ # _@param_ `message`
3443
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3444
+ def warn(message = nil, &block); end
3445
+
3446
+ # _@param_ `message`
3447
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3448
+ def info(message = nil, &block); end
3449
+
3450
+ # _@param_ `message`
3451
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3452
+ def debug(message = nil, &block); end
3453
+
3454
+ # _@param_ `message`
3455
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3456
+ def finer(message = nil, &block); end
3457
+
3458
+ # @sg-ignore
3459
+ sig { returns(Symbol) }
3460
+ def log_level; end
3461
+ end
3462
+
3463
+ # Add useful info (like resource task names) into an Asana
3464
+ # event/event filters/webhook subscription for human consumption
3465
+ class AsanaEventEnrichment
3466
+ include Logging
3467
+
3468
+ # _@param_ `config`
3469
+ #
3470
+ # _@param_ `workspaces`
3471
+ #
3472
+ # _@param_ `tasks`
3473
+ #
3474
+ # _@param_ `sections`
3475
+ #
3476
+ # _@param_ `projects`
3477
+ #
3478
+ # _@param_ `resources`
3479
+ #
3480
+ # _@param_ `clients`
3481
+ #
3482
+ # _@param_ `client`
3483
+ #
3484
+ # _@param_ `asana_event_enrichment`
3485
+ sig do
3486
+ params(
3487
+ config: T::Hash[T.untyped, T.untyped],
3488
+ workspaces: Checkoff::Workspaces,
3489
+ tasks: Checkoff::Tasks,
3490
+ sections: Checkoff::Sections,
3491
+ projects: Checkoff::Projects,
3492
+ resources: Checkoff::Resources,
3493
+ clients: Checkoff::Clients,
3494
+ client: Asana::Client
3495
+ ).void
3496
+ end
3497
+ def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana), workspaces: Checkoff::Workspaces.new(config: config), tasks: Checkoff::Tasks.new(config: config), sections: Checkoff::Sections.new(config: config), projects: Checkoff::Projects.new(config: config), resources: Checkoff::Resources.new(config: config), clients: Checkoff::Clients.new(config: config), client: clients.client); end
3498
+
3499
+ # Add useful info (like resource task names) into an event for
3500
+ # human consumption
3501
+ #
3502
+ # _@param_ `asana_event`
3503
+ sig { params(asana_event: T::Hash[T.untyped, T.untyped]).returns(T::Hash[T.untyped, T.untyped]) }
3504
+ def enrich_event(asana_event); end
3505
+
3506
+ # sord warn - "[String" does not appear to be a type
3507
+ # sord warn - "Array<String>]" does not appear to be a type
3508
+ # sord warn - Invalid hash, must have exactly two types: "Hash<String,[String,Array<String>]>".
3509
+ # sord warn - "[String" does not appear to be a type
3510
+ # sord warn - "Array<String>]" does not appear to be a type
3511
+ # sord warn - Invalid hash, must have exactly two types: "Hash<String,[String,Array<String>]>".
3512
+ # _@param_ `filter`
3513
+ sig { params(filter: T.untyped).returns(T.untyped) }
3514
+ def enrich_filter(filter); end
3515
+
3516
+ # _@param_ `webhook_subscription` — Hash of the request made to webhook POST endpoint - https://app.asana.com/api/1.0/webhooks https://developers.asana.com/reference/createwebhook
3517
+ sig { params(webhook_subscription: T::Hash[T.untyped, T.untyped]).void }
3518
+ def enrich_webhook_subscription!(webhook_subscription); end
3519
+
3520
+ # sord warn - "[String" does not appear to be a type
3521
+ # sord warn - "nil]" does not appear to be a type
3522
+ # sord warn - "[String" does not appear to be a type
3523
+ # sord warn - "nil]" does not appear to be a type
3524
+ # Attempt to look up a GID in situations where we don't have a
3525
+ # resource type provided, and returns the name of the resource.
3526
+ #
3527
+ # _@param_ `gid`
3528
+ #
3529
+ # _@param_ `resource_type`
3530
+ sig { params(gid: String, resource_type: T.nilable(String)).returns(T::Array[[T.untyped, T.untyped, T.untyped, T.untyped]]) }
3531
+ def enrich_gid(gid, resource_type: nil); end
3532
+
3533
+ # _@param_ `filter`
3534
+ sig { params(filter: T::Hash[String, String]).returns(T.nilable(String)) }
3535
+ def enrich_filter_parent_gid!(filter); end
3536
+
3537
+ # _@param_ `filter`
3538
+ sig { params(filter: T::Hash[String, String]).void }
3539
+ def enrich_filter_resource!(filter); end
3540
+
3541
+ # sord warn - "[String" does not appear to be a type
3542
+ # sord warn - "Array<String>]" does not appear to be a type
3543
+ # sord warn - Invalid hash, must have exactly two types: "Hash{String => [String,Array<String>]}".
3544
+ # _@param_ `filter`
3545
+ sig { params(filter: T.untyped).void }
3546
+ def enrich_filter_section!(filter); end
3547
+
3548
+ # sord warn - "'resource'" does not appear to be a type
3549
+ # _@param_ `asana_event`
3550
+ sig { params(asana_event: T::Hash[T.untyped, T::Hash[T.untyped, T.untyped]]).void }
3551
+ def enrich_event_parent!(asana_event); end
3552
+
3553
+ # sord warn - "'resource'" does not appear to be a type
3554
+ # _@param_ `asana_event`
3555
+ sig { params(asana_event: T::Hash[T.untyped, T::Hash[T.untyped, T.untyped]]).void }
3556
+ def enrich_event_resource!(asana_event); end
3557
+
3558
+ sig { returns(::Logger) }
3559
+ def logger; end
3560
+
3561
+ # _@param_ `message`
3562
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3563
+ def error(message = nil, &block); end
3564
+
3565
+ # _@param_ `message`
3566
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3567
+ def warn(message = nil, &block); end
3568
+
3569
+ # _@param_ `message`
3570
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3571
+ def info(message = nil, &block); end
3572
+
3573
+ # _@param_ `message`
3574
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3575
+ def debug(message = nil, &block); end
3576
+
3577
+ # _@param_ `message`
3578
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
3579
+ def finer(message = nil, &block); end
3580
+
3581
+ # @sg-ignore
3582
+ sig { returns(Symbol) }
3583
+ def log_level; end
3584
+
3585
+ sig { returns(Checkoff::Projects) }
3586
+ attr_reader :projects
3587
+
3588
+ sig { returns(Checkoff::Sections) }
3589
+ attr_reader :sections
3590
+
3591
+ sig { returns(Checkoff::Tasks) }
3592
+ attr_reader :tasks
3593
+
3594
+ sig { returns(Checkoff::Workspaces) }
3595
+ attr_reader :workspaces
3596
+
3597
+ sig { returns(Checkoff::Resources) }
3598
+ attr_reader :resources
3599
+
3600
+ sig { returns(Asana::Client) }
3601
+ attr_reader :client
3602
+ end
3603
+ end
3604
+
3605
+ # Base class to evaluate Asana resource selectors against an Asana resource
3606
+ class SelectorEvaluator
3607
+ # _@param_ `selector`
3608
+ sig { params(selector: T::Array[T.untyped]).returns(T.nilable(T.any(T::Boolean, Object))) }
3609
+ def evaluate(selector); end
3610
+
3611
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
3612
+ def initializer_kwargs; end
3613
+
3614
+ # @sg-ignore
3615
+ sig { returns(T::Array[T.class_of(Checkoff::SelectorClasses::FunctionEvaluator)]) }
3616
+ def function_evaluators; end
3617
+
3618
+ # _@param_ `selector`
3619
+ #
3620
+ # _@param_ `evaluator`
3621
+ sig { params(selector: T::Array[T.untyped], evaluator: Checkoff::SelectorClasses::FunctionEvaluator).returns(T::Array[T.untyped]) }
3622
+ def evaluate_args(selector, evaluator); end
3623
+
3624
+ # _@param_ `selector`
3625
+ #
3626
+ # _@param_ `evaluator`
3627
+ sig { params(selector: T::Array[T.untyped], evaluator: Checkoff::SelectorClasses::FunctionEvaluator).returns(T.nilable(T.any(T::Boolean, Object))) }
3628
+ def try_this_evaluator(selector, evaluator); end
3629
+
3630
+ sig { returns(Asana::Resources::Resource) }
3631
+ attr_reader :item
3632
+ end
3633
+
3634
+ module SelectorClasses
3635
+ module Task
3636
+ # :in_a_real_project? function
3637
+ class InARealProjectPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3638
+ sig { returns(T::Boolean) }
3639
+ def matches?; end
3640
+
3641
+ # _@param_ `_index`
3642
+ sig { params(_index: Integer).returns(T::Boolean) }
3643
+ def evaluate_arg?(_index); end
3644
+
3645
+ # @sg-ignore
3646
+ #
3647
+ # _@param_ `task`
3648
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
3649
+ def evaluate(task); end
3650
+ end
3651
+
3652
+ # :section_name_starts_with? function
3653
+ class SectionNameStartsWithPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3654
+ sig { returns(T::Boolean) }
3655
+ def matches?; end
3656
+
3657
+ # _@param_ `_index`
3658
+ sig { params(_index: Integer).returns(T::Boolean) }
3659
+ def evaluate_arg?(_index); end
3660
+
3661
+ # @sg-ignore
3662
+ #
3663
+ # _@param_ `task`
3664
+ #
3665
+ # _@param_ `section_name_prefix`
3666
+ sig { params(task: Asana::Resources::Task, section_name_prefix: String).returns(T::Boolean) }
3667
+ def evaluate(task, section_name_prefix); end
3668
+ end
3669
+
3670
+ # :in_section_named? function
3671
+ class InSectionNamedPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3672
+ sig { returns(T::Boolean) }
3673
+ def matches?; end
3674
+
3675
+ # _@param_ `_index`
3676
+ sig { params(_index: Integer).returns(T::Boolean) }
3677
+ def evaluate_arg?(_index); end
3678
+
3679
+ # @sg-ignore
3680
+ #
3681
+ # _@param_ `task`
3682
+ #
3683
+ # _@param_ `section_name`
3684
+ sig { params(task: Asana::Resources::Task, section_name: String).returns(T::Boolean) }
3685
+ def evaluate(task, section_name); end
3686
+ end
3687
+
3688
+ # :in_project_named? function
3689
+ class InProjectNamedPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3690
+ sig { returns(T::Boolean) }
3691
+ def matches?; end
3692
+
3693
+ # _@param_ `_index`
3694
+ sig { params(_index: Integer).returns(T::Boolean) }
3695
+ def evaluate_arg?(_index); end
3696
+
3697
+ # @sg-ignore
3698
+ #
3699
+ # _@param_ `task`
3700
+ #
3701
+ # _@param_ `project_name`
3702
+ sig { params(task: Asana::Resources::Task, project_name: String).returns(T::Boolean) }
3703
+ def evaluate(task, project_name); end
3704
+ end
3705
+
3706
+ # :in_portfolio_more_than_once? function
3707
+ class InPortfolioMoreThanOncePFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3708
+ sig { returns(T::Boolean) }
3709
+ def matches?; end
3710
+
3711
+ # _@param_ `_index`
3712
+ sig { params(_index: Integer).returns(T::Boolean) }
3713
+ def evaluate_arg?(_index); end
3714
+
3715
+ # @sg-ignore
3716
+ #
3717
+ # _@param_ `task`
3718
+ #
3719
+ # _@param_ `portfolio_name`
3720
+ sig { params(task: Asana::Resources::Task, portfolio_name: String).returns(T::Boolean) }
3721
+ def evaluate(task, portfolio_name); end
3722
+ end
3723
+
3724
+ # :tag? function
3725
+ class TagPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3726
+ sig { returns(T::Boolean) }
3727
+ def matches?; end
3728
+
3729
+ # _@param_ `_index`
3730
+ sig { params(_index: Integer).returns(T::Boolean) }
3731
+ def evaluate_arg?(_index); end
3732
+
3733
+ # @sg-ignore
3734
+ #
3735
+ # _@param_ `task`
3736
+ #
3737
+ # _@param_ `tag_name`
3738
+ sig { params(task: Asana::Resources::Task, tag_name: String).returns(T::Boolean) }
3739
+ def evaluate(task, tag_name); end
3740
+ end
3741
+
3742
+ # :ready? function
3743
+ #
3744
+ # See GLOSSARY.md and tasks.rb#task_ready? for more information.
3745
+ class ReadyPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3746
+ sig { returns(T::Boolean) }
3747
+ def matches?; end
3748
+
3749
+ # _@param_ `_index`
3750
+ sig { params(_index: Integer).returns(T::Boolean) }
3751
+ def evaluate_arg?(_index); end
3752
+
3753
+ # rubocop:disable Style/OptionalBooleanParameter
3754
+ #
3755
+ # _@param_ `task`
3756
+ #
3757
+ # _@param_ `period` — - :now_or_before or :this_week
3758
+ #
3759
+ # _@param_ `ignore_dependencies`
3760
+ sig { params(task: Asana::Resources::Task, period: Symbol, ignore_dependencies: T::Boolean).returns(T::Boolean) }
3761
+ def evaluate(task, period = :now_or_before, ignore_dependencies = false); end
3762
+ end
3763
+
3764
+ # :in_period? function
3765
+ class InPeriodPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3766
+ sig { returns(T::Boolean) }
3767
+ def matches?; end
3768
+
3769
+ # _@param_ `_index`
3770
+ sig { params(_index: Integer).returns(T::Boolean) }
3771
+ def evaluate_arg?(_index); end
3772
+
3773
+ # _@param_ `task`
3774
+ #
3775
+ # _@param_ `field_name` — See Checksoff::Tasks#in_period?
3776
+ #
3777
+ # _@param_ `period` — See Checkoff::Timing#in_period?
3778
+ sig { params(task: Asana::Resources::Task, field_name: Symbol, period: T.any(Symbol, T::Array[Symbol])).returns(T::Boolean) }
3779
+ def evaluate(task, field_name, period); end
3780
+ end
3781
+
3782
+ # :unassigned? function
3783
+ class UnassignedPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3784
+ sig { returns(T::Boolean) }
3785
+ def matches?; end
3786
+
3787
+ # _@param_ `task`
3788
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
3789
+ def evaluate(task); end
3790
+ end
3791
+
3792
+ # :due_date_set? function
3793
+ class DueDateSetPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3794
+ FUNCTION_NAME = T.let(:due_date_set?, T.untyped)
3795
+
3796
+ sig { returns(T::Boolean) }
3797
+ def matches?; end
3798
+
3799
+ # @sg-ignore
3800
+ #
3801
+ # _@param_ `task`
3802
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
3803
+ def evaluate(task); end
3804
+ end
3805
+
3806
+ # :last_story_created_less_than_n_days_ago? function
3807
+ class LastStoryCreatedLessThanNDaysAgoPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3808
+ FUNCTION_NAME = T.let(:last_story_created_less_than_n_days_ago?, T.untyped)
3809
+
3810
+ sig { returns(T::Boolean) }
3811
+ def matches?; end
3812
+
3813
+ sig { params(_index: Integer).returns(T::Boolean) }
3814
+ def evaluate_arg?(_index); end
3815
+
3816
+ # _@param_ `task`
3817
+ #
3818
+ # _@param_ `num_days`
3819
+ #
3820
+ # _@param_ `excluding_resource_subtypes`
3821
+ sig { params(task: Asana::Resources::Task, num_days: Integer, excluding_resource_subtypes: T::Array[String]).returns(T::Boolean) }
3822
+ def evaluate(task, num_days, excluding_resource_subtypes); end
3823
+ end
3824
+
3825
+ # :estimate_exceeds_duration?
3826
+ class EstimateExceedsDurationPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3827
+ FUNCTION_NAME = T.let(:estimate_exceeds_duration?, T.untyped)
3828
+
3829
+ sig { returns(T::Boolean) }
3830
+ def matches?; end
3831
+
3832
+ # _@param_ `task`
3833
+ sig { params(task: Asana::Resources::Task).returns(Float) }
3834
+ def calculate_allocated_hours(task); end
3835
+
3836
+ # _@param_ `task`
3837
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
3838
+ def evaluate(task); end
3839
+ end
3840
+
3841
+ # :dependent_on_previous_section_last_milestone?
3842
+ class DependentOnPreviousSectionLastMilestonePFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3843
+ FUNCTION_NAME = T.let(:dependent_on_previous_section_last_milestone?, T.untyped)
3844
+
3845
+ sig { returns(T::Boolean) }
3846
+ def matches?; end
3847
+
3848
+ # only projects in this portfolio will be evaluated.
3849
+ #
3850
+ # _@param_ `task`
3851
+ #
3852
+ # _@param_ `project_name`
3853
+ #
3854
+ # _@param_ `limit_to_portfolio_gid` — If specified,
3855
+ sig { params(task: Asana::Resources::Task, limit_to_portfolio_gid: T.nilable(String)).returns(T::Boolean) }
3856
+ def evaluate(task, limit_to_portfolio_gid: nil); end
3857
+ end
3858
+
3859
+ # :in_portfolio_named? function
3860
+ class InPortfolioNamedPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3861
+ FUNCTION_NAME = T.let(:in_portfolio_named?, T.untyped)
3862
+
3863
+ sig { returns(T::Boolean) }
3864
+ def matches?; end
3865
+
3866
+ # _@param_ `task`
3867
+ #
3868
+ # _@param_ `portfolio_name`
3869
+ sig { params(task: Asana::Resources::Task, portfolio_name: String).returns(T::Boolean) }
3870
+ def evaluate(task, portfolio_name); end
3871
+ end
3872
+
3873
+ # :last_task_milestone_does_not_depend_on_this_task? function
3874
+ class LastTaskMilestoneDoesNotDependOnThisTaskPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3875
+ FUNCTION_NAME = T.let(:last_task_milestone_does_not_depend_on_this_task?, T.untyped)
3876
+
3877
+ sig { returns(T::Boolean) }
3878
+ def matches?; end
3879
+
3880
+ sig { params(_index: Integer).returns(T::Boolean) }
3881
+ def evaluate_arg?(_index); end
3882
+
3883
+ # _@param_ `task`
3884
+ #
3885
+ # _@param_ `limit_to_portfolio_name`
3886
+ sig { params(task: Asana::Resources::Task, limit_to_portfolio_name: T.nilable(String)).returns(T::Boolean) }
3887
+ def evaluate(task, limit_to_portfolio_name = nil); end
3888
+ end
3889
+
3890
+ # :milestone? function
3891
+ class MilestonePFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3892
+ FUNCTION_NAME = T.let(:milestone?, T.untyped)
3893
+
3894
+ sig { returns(T::Boolean) }
3895
+ def matches?; end
3896
+
3897
+ sig { params(_index: Integer).returns(T::Boolean) }
3898
+ def evaluate_arg?(_index); end
3899
+
3900
+ # _@param_ `task`
3901
+ sig { params(task: Asana::Resources::Task).returns(T::Boolean) }
3902
+ def evaluate(task); end
3903
+ end
3904
+
3905
+ # :milestone_does_not_depend_on_this_task? function
3906
+ class NoMilestoneDependsOnThisTaskPFunctionEvaluator < Checkoff::SelectorClasses::Task::FunctionEvaluator
3907
+ FUNCTION_NAME = T.let(:no_milestone_depends_on_this_task?, T.untyped)
3908
+
3909
+ sig { returns(T::Boolean) }
3910
+ def matches?; end
3911
+
3912
+ sig { params(_index: Integer).returns(T::Boolean) }
3913
+ def evaluate_arg?(_index); end
3914
+
3915
+ # _@param_ `task`
3916
+ #
3917
+ # _@param_ `limit_to_portfolio_name`
3918
+ sig { params(task: Asana::Resources::Task, limit_to_portfolio_name: T.nilable(String)).returns(T::Boolean) }
3919
+ def evaluate(task, limit_to_portfolio_name = nil); end
3920
+ end
3921
+
3922
+ # Base class to evaluate a task selector function given fully evaluated arguments
3923
+ class FunctionEvaluator < Checkoff::SelectorClasses::FunctionEvaluator
3924
+ # _@param_ `selector`
3925
+ #
3926
+ # _@param_ `tasks`
3927
+ #
3928
+ # _@param_ `timelines`
3929
+ #
3930
+ # _@param_ `custom_fields`
3931
+ sig do
3932
+ params(
3933
+ selector: T.any(T::Array[[Symbol, T::Array[T.untyped]]], String),
3934
+ tasks: Checkoff::Tasks,
3935
+ timelines: Checkoff::Timelines,
3936
+ custom_fields: Checkoff::CustomFields,
3937
+ _kwargs: T.untyped
3938
+ ).void
3939
+ end
3940
+ def initialize(selector:, tasks:, timelines:, custom_fields:, **_kwargs); end
3941
+
3942
+ sig { returns(T::Array[[Symbol, T::Array[T.untyped]]]) }
3943
+ attr_reader :selector
3944
+ end
3945
+ end
3946
+
3947
+ module Common
3948
+ # :and function
3949
+ class AndFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
3950
+ FUNCTION_NAME = T.let(:and, T.untyped)
3951
+
3952
+ sig { returns(T::Boolean) }
3953
+ def matches?; end
3954
+
3955
+ # _@param_ `_resource`
3956
+ #
3957
+ # _@param_ `args`
3958
+ sig { params(_resource: T.any(Asana::Resources::Task, Asana::Resources::Project), args: T::Array[Object]).returns(T::Boolean) }
3959
+ def evaluate(_resource, *args); end
3960
+ end
3961
+
3962
+ # :or function
3963
+ #
3964
+ # Does not yet shortcut, but may in future - be careful with side
3965
+ # effects!
3966
+ class OrFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
3967
+ FUNCTION_NAME = T.let(:or, T.untyped)
3968
+
3969
+ sig { returns(T::Boolean) }
3970
+ def matches?; end
3971
+
3972
+ # _@param_ `_resource`
3973
+ #
3974
+ # _@param_ `args`
3975
+ sig { params(_resource: T.any(Asana::Resources::Task, Asana::Resources::Project), args: T::Array[Object]).returns(T::Boolean) }
3976
+ def evaluate(_resource, *args); end
3977
+ end
3978
+
3979
+ # :not function
3980
+ class NotFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
3981
+ FUNCTION_NAME = T.let(:not, T.untyped)
3982
+
3983
+ sig { returns(T::Boolean) }
3984
+ def matches?; end
3985
+
3986
+ # _@param_ `_resource`
3987
+ #
3988
+ # _@param_ `subvalue`
3989
+ sig { params(_resource: T.any(Asana::Resources::Task, Asana::Resources::Project), subvalue: Object).returns(T::Boolean) }
3990
+ def evaluate(_resource, subvalue); end
3991
+ end
3992
+
3993
+ # :nil? function
3994
+ class NilPFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
3995
+ sig { returns(T::Boolean) }
3996
+ def matches?; end
3997
+
3998
+ # _@param_ `_resource`
3999
+ #
4000
+ # _@param_ `subvalue`
4001
+ sig { params(_resource: T.any(Asana::Resources::Task, Asana::Resources::Project), subvalue: Object).returns(T::Boolean) }
4002
+ def evaluate(_resource, subvalue); end
4003
+ end
4004
+
4005
+ # :equals? function
4006
+ class EqualsPFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4007
+ FUNCTION_NAME = T.let(:equals?, T.untyped)
4008
+
4009
+ sig { returns(T::Boolean) }
4010
+ def matches?; end
4011
+
4012
+ # _@param_ `_resource`
4013
+ #
4014
+ # _@param_ `lhs`
4015
+ #
4016
+ # _@param_ `rhs`
4017
+ sig { params(_resource: T.any(Asana::Resources::Task, Asana::Resources::Project), lhs: Object, rhs: Object).returns(T::Boolean) }
4018
+ def evaluate(_resource, lhs, rhs); end
4019
+ end
4020
+
4021
+ # :custom_field_value function
4022
+ class CustomFieldValueFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4023
+ FUNCTION_NAME = T.let(:custom_field_value, T.untyped)
4024
+
4025
+ sig { returns(T::Boolean) }
4026
+ def matches?; end
4027
+
4028
+ # _@param_ `_index`
4029
+ sig { params(_index: Integer).returns(T::Boolean) }
4030
+ def evaluate_arg?(_index); end
4031
+
4032
+ # _@param_ `resource`
4033
+ #
4034
+ # _@param_ `custom_field_name`
4035
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), custom_field_name: String).returns(T.nilable(String)) }
4036
+ def evaluate(resource, custom_field_name); end
4037
+ end
4038
+
4039
+ # :custom_field_gid_value function
4040
+ class CustomFieldGidValueFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4041
+ sig { returns(T::Boolean) }
4042
+ def matches?; end
4043
+
4044
+ sig { params(_index: Integer).returns(T::Boolean) }
4045
+ def evaluate_arg?(_index); end
4046
+
4047
+ # @sg-ignore
4048
+ #
4049
+ # _@param_ `resource`
4050
+ #
4051
+ # _@param_ `custom_field_gid`
4052
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), custom_field_gid: String).returns(T.nilable(String)) }
4053
+ def evaluate(resource, custom_field_gid); end
4054
+ end
4055
+
4056
+ # :custom_field_gid_value_contains_any_gid? function
4057
+ class CustomFieldGidValueContainsAnyGidPFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4058
+ FUNCTION_NAME = T.let(:custom_field_gid_value_contains_any_gid?, T.untyped)
4059
+
4060
+ sig { returns(T::Boolean) }
4061
+ def matches?; end
4062
+
4063
+ sig { params(_index: Integer).returns(T::Boolean) }
4064
+ def evaluate_arg?(_index); end
4065
+
4066
+ # _@param_ `resource`
4067
+ #
4068
+ # _@param_ `custom_field_gid`
4069
+ #
4070
+ # _@param_ `custom_field_values_gids`
4071
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), custom_field_gid: String, custom_field_values_gids: T::Array[String]).returns(T::Boolean) }
4072
+ def evaluate(resource, custom_field_gid, custom_field_values_gids); end
4073
+ end
4074
+
4075
+ # :custom_field_value_contains_any_value?
4076
+ class CustomFieldValueContainsAnyValuePFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4077
+ FUNCTION_NAME = T.let(:custom_field_value_contains_any_value?, T.untyped)
4078
+
4079
+ sig { returns(T::Boolean) }
4080
+ def matches?; end
4081
+
4082
+ sig { params(_index: Integer).returns(T::Boolean) }
4083
+ def evaluate_arg?(_index); end
4084
+
4085
+ # _@param_ `resource`
4086
+ #
4087
+ # _@param_ `custom_field_name`
4088
+ #
4089
+ # _@param_ `custom_field_value_names`
4090
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), custom_field_name: String, custom_field_value_names: T::Array[String]).returns(T::Boolean) }
4091
+ def evaluate(resource, custom_field_name, custom_field_value_names); end
4092
+ end
4093
+
4094
+ # :custom_field_gid_value_contains_all_gids? function
4095
+ class CustomFieldGidValueContainsAllGidsPFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4096
+ FUNCTION_NAME = T.let(:custom_field_gid_value_contains_all_gids?, T.untyped)
4097
+
4098
+ sig { returns(T::Boolean) }
4099
+ def matches?; end
4100
+
4101
+ sig { params(_index: Integer).returns(T::Boolean) }
4102
+ def evaluate_arg?(_index); end
4103
+
4104
+ # _@param_ `resource`
4105
+ #
4106
+ # _@param_ `custom_field_gid`
4107
+ #
4108
+ # _@param_ `custom_field_values_gids`
4109
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), custom_field_gid: String, custom_field_values_gids: T::Array[String]).returns(T::Boolean) }
4110
+ def evaluate(resource, custom_field_gid, custom_field_values_gids); end
4111
+ end
4112
+
4113
+ # :name_starts_with? function
4114
+ class NameStartsWithPFunctionEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4115
+ FUNCTION_NAME = T.let(:name_starts_with?, T.untyped)
4116
+
4117
+ sig { returns(T::Boolean) }
4118
+ def matches?; end
4119
+
4120
+ sig { params(_index: Integer).returns(T::Boolean) }
4121
+ def evaluate_arg?(_index); end
4122
+
4123
+ # @sg-ignore
4124
+ #
4125
+ # _@param_ `resource`
4126
+ #
4127
+ # _@param_ `prefix`
4128
+ sig { params(resource: T.any(Asana::Resources::Task, Asana::Resources::Project), prefix: String).returns(T::Boolean) }
4129
+ def evaluate(resource, prefix); end
4130
+ end
4131
+
4132
+ # String literals
4133
+ class StringLiteralEvaluator < Checkoff::SelectorClasses::Common::FunctionEvaluator
4134
+ sig { returns(T::Boolean) }
4135
+ def matches?; end
4136
+
4137
+ # @sg-ignore
4138
+ #
4139
+ # _@param_ `_resource`
4140
+ sig { params(_resource: T.any(Asana::Resources::Task, Asana::Resources::Project)).returns(String) }
4141
+ def evaluate(_resource); end
4142
+ end
4143
+
4144
+ # Base class to evaluate a project selector function given fully evaluated arguments
4145
+ class FunctionEvaluator < Checkoff::SelectorClasses::FunctionEvaluator
4146
+ # _@param_ `selector`
4147
+ #
4148
+ # _@param_ `custom_fields`
4149
+ sig { params(selector: T.any(T::Array[[Symbol, T::Array[T.untyped]]], String), custom_fields: Checkoff::CustomFields, _kwargs: T.untyped).void }
4150
+ def initialize(selector:, custom_fields:, **_kwargs); end
4151
+
4152
+ sig { returns(T::Array[[Symbol, T::Array[T.untyped]]]) }
4153
+ attr_reader :selector
4154
+ end
4155
+ end
4156
+
4157
+ # Project selector classes
4158
+ module Project
4159
+ # :due_date function
4160
+ class DueDateFunctionEvaluator < Checkoff::SelectorClasses::Project::FunctionEvaluator
4161
+ FUNCTION_NAME = T.let(:due_date, T.untyped)
4162
+
4163
+ sig { returns(T::Boolean) }
4164
+ def matches?; end
4165
+
4166
+ # _@param_ `resource`
4167
+ sig { params(resource: Asana::Resources::Project).returns(T.nilable(String)) }
4168
+ def evaluate(resource); end
4169
+ end
4170
+
4171
+ # :ready? function
4172
+ class ReadyPFunctionEvaluator < Checkoff::SelectorClasses::Project::FunctionEvaluator
4173
+ FUNCTION_NAME = T.let(:ready?, T.untyped)
4174
+
4175
+ sig { returns(T::Boolean) }
4176
+ def matches?; end
4177
+
4178
+ # _@param_ `project`
4179
+ #
4180
+ # _@param_ `period` — - :now_or_before or :this_week
4181
+ sig { params(project: Asana::Resources::Project, period: Symbol).returns(T::Boolean) }
4182
+ def evaluate(project, period = :now_or_before); end
4183
+ end
4184
+
4185
+ # :in_portfolio_named? function
4186
+ class InPortfolioNamedPFunctionEvaluator < Checkoff::SelectorClasses::Project::FunctionEvaluator
4187
+ FUNCTION_NAME = T.let(:in_portfolio_named?, T.untyped)
4188
+
4189
+ sig { returns(T::Boolean) }
4190
+ def matches?; end
4191
+
4192
+ # _@param_ `project`
4193
+ #
4194
+ # _@param_ `portfolio_name`
4195
+ #
4196
+ # _@param_ `workspace_name`
4197
+ #
4198
+ # _@param_ `extra_project_fields`
4199
+ sig do
4200
+ params(
4201
+ project: Asana::Resources::Project,
4202
+ portfolio_name: String,
4203
+ workspace_name: T.nilable(String),
4204
+ extra_project_fields: T::Array[String]
4205
+ ).returns(T::Boolean)
4206
+ end
4207
+ def evaluate(project, portfolio_name, workspace_name: nil, extra_project_fields: []); end
4208
+ end
4209
+
4210
+ # Base class to evaluate a project selector function given fully evaluated arguments
4211
+ class FunctionEvaluator < Checkoff::SelectorClasses::FunctionEvaluator
4212
+ # _@param_ `selector`
4213
+ #
4214
+ # _@param_ `projects`
4215
+ #
4216
+ # _@param_ `portfolios`
4217
+ #
4218
+ # _@param_ `workspaces`
4219
+ sig do
4220
+ params(
4221
+ selector: T.any(T::Array[[Symbol, T::Array[T.untyped]]], String),
4222
+ projects: Checkoff::Projects,
4223
+ portfolios: Checkoff::Portfolios,
4224
+ workspaces: Checkoff::Workspaces,
4225
+ _kwargs: T.untyped
4226
+ ).void
4227
+ end
4228
+ def initialize(selector:, projects:, portfolios:, workspaces:, **_kwargs); end
4229
+
4230
+ sig { returns(T::Array[[Symbol, T::Array[T.untyped]]]) }
4231
+ attr_reader :selector
4232
+ end
4233
+ end
4234
+
4235
+ # Section selector classes
4236
+ module Section
4237
+ # :ends_with_milestone function
4238
+ class EndsWithMilestoneFunctionEvaluator < Checkoff::SelectorClasses::Section::FunctionEvaluator
4239
+ FUNCTION_NAME = T.let(:ends_with_milestone, T.untyped)
4240
+
4241
+ sig { returns(T::Boolean) }
4242
+ def matches?; end
4243
+
4244
+ # @sg-ignore
4245
+ #
4246
+ # _@param_ `section`
4247
+ sig { params(section: Asana::Resources::Section).returns(T::Boolean) }
4248
+ def evaluate(section); end
4249
+ end
4250
+
4251
+ # :has_tasks? function
4252
+ class HasTasksPFunctionEvaluator < Checkoff::SelectorClasses::Section::FunctionEvaluator
4253
+ FUNCTION_NAME = T.let(:has_tasks?, T.untyped)
4254
+
4255
+ sig { returns(T::Boolean) }
4256
+ def matches?; end
4257
+
4258
+ # @sg-ignore
4259
+ #
4260
+ # _@param_ `section`
4261
+ sig { params(section: Asana::Resources::Section).returns(T::Boolean) }
4262
+ def evaluate(section); end
4263
+ end
4264
+
4265
+ # Base class to evaluate a project selector function given fully evaluated arguments
4266
+ class FunctionEvaluator < Checkoff::SelectorClasses::FunctionEvaluator
4267
+ # _@param_ `selector`
4268
+ #
4269
+ # _@param_ `client`
4270
+ #
4271
+ # _@param_ `sections`
4272
+ #
4273
+ # _@param_ `kwargs`
4274
+ sig do
4275
+ params(
4276
+ selector: T.any(T::Array[[Symbol, T::Array[T.untyped]]], String),
4277
+ sections: Checkoff::Sections,
4278
+ client: Asana::Client,
4279
+ kwargs: T::Hash[T.untyped, T.untyped]
4280
+ ).void
4281
+ end
4282
+ def initialize(selector:, sections:, client:, **kwargs); end
4283
+
4284
+ sig { returns(T::Array[[Symbol, T::Array[T.untyped]]]) }
4285
+ attr_reader :selector
4286
+
4287
+ sig { returns(Asana::Client) }
4288
+ attr_reader :client
4289
+ end
4290
+ end
4291
+
4292
+ # Base class to evaluate types of selector functions
4293
+ class FunctionEvaluator
4294
+ include Logging
4295
+
4296
+ # @sg-ignore
4297
+ #
4298
+ # _@param_ `_index`
4299
+ sig { params(_index: Integer).returns(T::Boolean) }
4300
+ def evaluate_arg?(_index); end
4301
+
4302
+ # @sg-ignore
4303
+ sig { returns(T::Boolean) }
4304
+ def matches?; end
4305
+
4306
+ # @sg-ignore
4307
+ #
4308
+ # _@param_ `_task`
4309
+ #
4310
+ # _@param_ `_args`
4311
+ sig { params(_task: Asana::Resources::Task, _args: T::Array[Object]).returns(Object) }
4312
+ def evaluate(_task, *_args); end
4313
+
4314
+ # _@param_ `object`
4315
+ #
4316
+ # _@param_ `fn_name`
4317
+ sig { params(object: Object, fn_name: Symbol).returns(T::Boolean) }
4318
+ def fn?(object, fn_name); end
4319
+
4320
+ sig { returns(::Logger) }
4321
+ def logger; end
4322
+
4323
+ # _@param_ `message`
4324
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4325
+ def error(message = nil, &block); end
4326
+
4327
+ # _@param_ `message`
4328
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4329
+ def warn(message = nil, &block); end
4330
+
4331
+ # _@param_ `message`
4332
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4333
+ def info(message = nil, &block); end
4334
+
4335
+ # _@param_ `message`
4336
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4337
+ def debug(message = nil, &block); end
4338
+
4339
+ # _@param_ `message`
4340
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4341
+ def finer(message = nil, &block); end
4342
+
4343
+ # @sg-ignore
4344
+ sig { returns(Symbol) }
4345
+ def log_level; end
4346
+ end
4347
+ end
4348
+
4349
+ # Evaluates task selectors against a task
4350
+ class TaskSelectorEvaluator < Checkoff::SelectorEvaluator
4351
+ COMMON_FUNCTION_EVALUATORS = T.let((Checkoff::SelectorClasses::Common.constants.map do |const|
4352
+ Checkoff::SelectorClasses::Common.const_get(const)
4353
+ end - [Checkoff::SelectorClasses::Common::FunctionEvaluator]).freeze, T.untyped)
4354
+ TASK_FUNCTION_EVALUATORS = T.let((Checkoff::SelectorClasses::Task.constants.map do |const|
4355
+ Checkoff::SelectorClasses::Task.const_get(const)
4356
+ end - [Checkoff::SelectorClasses::Task::FunctionEvaluator]).freeze, T.untyped)
4357
+ FUNCTION_EVALUTORS = T.let((COMMON_FUNCTION_EVALUATORS + TASK_FUNCTION_EVALUATORS).freeze, T.untyped)
4358
+
4359
+ # _@param_ `task`
4360
+ #
4361
+ # _@param_ `tasks`
4362
+ #
4363
+ # _@param_ `timelines`
4364
+ #
4365
+ # _@param_ `custom_fields`
4366
+ sig do
4367
+ params(
4368
+ task: Asana::Resources::Task,
4369
+ tasks: Checkoff::Tasks,
4370
+ timelines: Checkoff::Timelines,
4371
+ custom_fields: Checkoff::CustomFields
4372
+ ).void
4373
+ end
4374
+ def initialize(task:, tasks: Checkoff::Tasks.new, timelines: Checkoff::Timelines.new, custom_fields: Checkoff::CustomFields.new); end
4375
+
4376
+ sig { returns(T::Array[T.class_of(Checkoff::SelectorClasses::Task::FunctionEvaluator)]) }
4377
+ def function_evaluators; end
4378
+
4379
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
4380
+ def initializer_kwargs; end
4381
+
4382
+ sig { returns(Asana::Resources::Task) }
4383
+ attr_reader :item
4384
+
4385
+ sig { returns(Checkoff::Tasks) }
4386
+ attr_reader :tasks
4387
+
4388
+ sig { returns(Checkoff::Timelines) }
4389
+ attr_reader :timelines
4390
+
4391
+ sig { returns(Checkoff::CustomFields) }
4392
+ attr_reader :custom_fields
4393
+ end
4394
+
4395
+ # Evaluates project selectors against a project
4396
+ class ProjectSelectorEvaluator < Checkoff::SelectorEvaluator
4397
+ COMMON_FUNCTION_EVALUATORS = T.let((Checkoff::SelectorClasses::Common.constants.map do |const|
4398
+ Checkoff::SelectorClasses::Common.const_get(const)
4399
+ end - [Checkoff::SelectorClasses::Common::FunctionEvaluator]).freeze, T.untyped)
4400
+ PROJECT_FUNCTION_EVALUATORS = T.let((Checkoff::SelectorClasses::Project.constants.map do |const|
4401
+ Checkoff::SelectorClasses::Project.const_get(const)
4402
+ end - [Checkoff::SelectorClasses::Project::FunctionEvaluator]).freeze, T.untyped)
4403
+ FUNCTION_EVALUTORS = T.let((COMMON_FUNCTION_EVALUATORS + PROJECT_FUNCTION_EVALUATORS).freeze, T.untyped)
4404
+
4405
+ # _@param_ `project`
4406
+ #
4407
+ # _@param_ `projects`
4408
+ #
4409
+ # _@param_ `custom_fields`
4410
+ #
4411
+ # _@param_ `workspaces`
4412
+ #
4413
+ # _@param_ `portfolios`
4414
+ sig do
4415
+ params(
4416
+ project: Asana::Resources::Project,
4417
+ projects: Checkoff::Projects,
4418
+ custom_fields: Checkoff::CustomFields,
4419
+ workspaces: Checkoff::Workspaces,
4420
+ portfolios: Checkoff::Portfolios
4421
+ ).void
4422
+ end
4423
+ def initialize(project:, projects: Checkoff::Projects.new, custom_fields: Checkoff::CustomFields.new, workspaces: Checkoff::Workspaces.new, portfolios: Checkoff::Portfolios.new); end
4424
+
4425
+ sig { returns(T::Array[T.class_of(Checkoff::SelectorClasses::Project::FunctionEvaluator)]) }
4426
+ def function_evaluators; end
4427
+
4428
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
4429
+ def initializer_kwargs; end
4430
+
4431
+ sig { returns(Asana::Resources::Project) }
4432
+ attr_reader :item
4433
+
4434
+ sig { returns(Checkoff::Projects) }
4435
+ attr_reader :projects
4436
+
4437
+ sig { returns(Checkoff::CustomFields) }
4438
+ attr_reader :custom_fields
4439
+
4440
+ sig { returns(Checkoff::Workspaces) }
4441
+ attr_reader :workspaces
4442
+
4443
+ sig { returns(Checkoff::Portfolios) }
4444
+ attr_reader :portfolios
4445
+ end
4446
+
4447
+ # Evaluates section selectors against a section
4448
+ class SectionSelectorEvaluator < Checkoff::SelectorEvaluator
4449
+ COMMON_FUNCTION_EVALUATORS = T.let((Checkoff::SelectorClasses::Common.constants.map do |const|
4450
+ Checkoff::SelectorClasses::Common.const_get(const)
4451
+ end - [Checkoff::SelectorClasses::Common::FunctionEvaluator]).freeze, T.untyped)
4452
+ SECTION_FUNCTION_EVALUATORS = T.let((Checkoff::SelectorClasses::Section.constants.map do |const|
4453
+ Checkoff::SelectorClasses::Section.const_get(const)
4454
+ end - [Checkoff::SelectorClasses::Section::FunctionEvaluator]).freeze, T.untyped)
4455
+ FUNCTION_EVALUTORS = T.let((COMMON_FUNCTION_EVALUATORS + SECTION_FUNCTION_EVALUATORS).freeze, T.untyped)
4456
+
4457
+ # _@param_ `section`
4458
+ #
4459
+ # _@param_ `client`
4460
+ #
4461
+ # _@param_ `projects`
4462
+ #
4463
+ # _@param_ `sections`
4464
+ #
4465
+ # _@param_ `custom_fields`
4466
+ sig do
4467
+ params(
4468
+ section: Asana::Resources::Project,
4469
+ client: Asana::Client,
4470
+ projects: Checkoff::Projects,
4471
+ sections: Checkoff::Sections,
4472
+ custom_fields: Checkoff::CustomFields,
4473
+ _kwargs: T.untyped
4474
+ ).void
4475
+ end
4476
+ def initialize(section:, client:, projects: Checkoff::Projects.new(client: client), sections: Checkoff::Sections.new(client: client), custom_fields: Checkoff::CustomFields.new(client: client), **_kwargs); end
4477
+
4478
+ sig { returns(T::Array[T.class_of(Checkoff::SelectorClasses::Project::FunctionEvaluator)]) }
4479
+ def function_evaluators; end
4480
+
4481
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
4482
+ def initializer_kwargs; end
4483
+
4484
+ sig { returns(Asana::Resources::Project) }
4485
+ attr_reader :item
4486
+
4487
+ sig { returns(Checkoff::Sections) }
4488
+ attr_reader :sections
4489
+
4490
+ sig { returns(Checkoff::Projects) }
4491
+ attr_reader :projects
4492
+
4493
+ sig { returns(Checkoff::CustomFields) }
4494
+ attr_reader :custom_fields
4495
+
4496
+ sig { returns(Asana::Client) }
4497
+ attr_reader :client
4498
+ end
4499
+ end
4500
+
4501
+ # include this to add ability to log at different levels
4502
+ module Logging
4503
+ sig { returns(::Logger) }
4504
+ def logger; end
4505
+
4506
+ # _@param_ `message`
4507
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4508
+ def error(message = nil, &block); end
4509
+
4510
+ # _@param_ `message`
4511
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4512
+ def warn(message = nil, &block); end
4513
+
4514
+ # _@param_ `message`
4515
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4516
+ def info(message = nil, &block); end
4517
+
4518
+ # _@param_ `message`
4519
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4520
+ def debug(message = nil, &block); end
4521
+
4522
+ # _@param_ `message`
4523
+ sig { params(message: T.nilable(Object), block: T.untyped).void }
4524
+ def finer(message = nil, &block); end
4525
+
4526
+ # @sg-ignore
4527
+ sig { returns(Symbol) }
4528
+ def log_level; end
4529
+ end