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