slackblocks 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE +7 -0
- data/LICENSE.BSD-3-Clause +29 -0
- data/README.md +44 -0
- data/lib/slackblocks/components.rb +59 -0
- data/lib/slackblocks/generated/limits.rb +9 -0
- data/lib/slackblocks/generated/models.rb +979 -0
- data/lib/slackblocks/generated/style_flags.rb +6 -0
- data/lib/slackblocks/generated/vocabulary.rb +7 -0
- data/lib/slackblocks/rich_text_style.rb +13 -0
- data/lib/slackblocks/validation_error.rb +18 -0
- data/lib/slackblocks/validator.rb +284 -0
- data/lib/slackblocks/value.rb +274 -0
- data/lib/slackblocks/version.rb +4 -0
- data/lib/slackblocks.rb +11 -0
- data/sig/slackblocks/generated.rbs +1268 -0
- data/sig/slackblocks.rbs +76 -0
- metadata +62 -0
data/sig/slackblocks.rbs
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module Slackblocks
|
|
2
|
+
VERSION: String
|
|
3
|
+
SPEC_VERSION: String
|
|
4
|
+
|
|
5
|
+
module KeywordOnly
|
|
6
|
+
def new: (*untyped args, **untyped keywords) -> untyped
|
|
7
|
+
def []: (*untyped args, **untyped keywords) -> untyped
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
module Value
|
|
11
|
+
def self.deep_freeze: (untyped value) -> untyped
|
|
12
|
+
def self.fail!: (String category, String path, String message) -> bot
|
|
13
|
+
def self.string: (untyped value, String path) -> String
|
|
14
|
+
def self.json_value: (untyped value, String path, ?Hash[untyped, untyped] seen) -> untyped
|
|
15
|
+
def self.normalize_field: (Hash[String, untyped] field, untyped value, String path) -> untyped
|
|
16
|
+
def self.construct: (untyped klass, Hash[Symbol, untyped] keywords) -> Hash[Symbol, untyped]
|
|
17
|
+
def self.detach: (untyped value) -> untyped
|
|
18
|
+
def self.wire: (untyped klass, Hash[Symbol, untyped] values) -> Hash[String, untyped]
|
|
19
|
+
def initialize: (**untyped keywords) -> void
|
|
20
|
+
def additional_fields: () -> Hash[String, untyped]
|
|
21
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
22
|
+
def with: (**untyped changes) -> self
|
|
23
|
+
def ==: (untyped other) -> bool
|
|
24
|
+
def eql?: (untyped other) -> bool
|
|
25
|
+
def hash: () -> Integer
|
|
26
|
+
def as_json: (?untyped options) -> Hash[String, untyped]
|
|
27
|
+
def to_json: (?untyped options) -> String
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
module Limits
|
|
31
|
+
VALUES: Hash[String, Integer]
|
|
32
|
+
def self.[]: (String path) -> Integer
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
module Vocabulary
|
|
36
|
+
ICON_NAMES: Array[String]
|
|
37
|
+
SURFACE_BLOCK_TYPES: Hash[String, Array[String]]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
module Validator
|
|
41
|
+
def self.validate: (untyped klass, Hash[Symbol, untyped] values) -> untyped
|
|
42
|
+
def self.limit: (String key) -> Integer
|
|
43
|
+
def self.fail!: (String category, String path, String message) -> bot
|
|
44
|
+
def self.string_limit: (untyped value, String key, String path) -> untyped
|
|
45
|
+
def self.text_limit: (untyped value, String key, String path) -> untyped
|
|
46
|
+
def self.max_items: (untyped items, String key, String path) -> untyped
|
|
47
|
+
def self.special: (untyped klass, Hash[String, untyped] wire, String path) -> untyped
|
|
48
|
+
def self.surface: (Array[untyped] blocks, String name, String path) -> untyped
|
|
49
|
+
def self.standalone_task: (untyped value, String path) -> untyped
|
|
50
|
+
def self.message: (Hash[String, untyped] wire, String path) -> untyped
|
|
51
|
+
def self.tally: (untyped node, Hash[String, Integer] totals) -> untyped
|
|
52
|
+
def self.characters: (untyped node) -> Integer
|
|
53
|
+
def self.table: (Hash[String, untyped] wire, String path, bool data_table) -> untyped
|
|
54
|
+
def self.chart: (Hash[String, untyped] wire, String path) -> untyped
|
|
55
|
+
def self.check_limits: (untyped value, untyped prefix, String path) -> untyped
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class ValidationError < StandardError
|
|
59
|
+
CATEGORIES: Array[String]
|
|
60
|
+
attr_reader category: String
|
|
61
|
+
attr_reader path: String
|
|
62
|
+
def initialize: (String category, String path, String message) -> void
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
module AccordionSection
|
|
66
|
+
def self.create: (title: String | PlainText, blocks: Array[Block], ?subtitle: String | Text?, ?icon: ImageElement?, ?expanded: bool, ?width: :narrow | :standard | :wide | :full, ?has_header_divider: bool, ?block_id: String?) -> ContainerBlock
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
module Accordion
|
|
70
|
+
def self.create: (sections: Array[ContainerBlock]) -> Array[Block]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
module Paginator
|
|
74
|
+
def self.create: (action_id_prefix: String, blocks: Array[Block], ?page: Integer, ?page_size: Integer, ?previous_text: String, ?next_text: String, ?show_page_indicator: bool, ?block_id: String?) -> Array[Block]
|
|
75
|
+
end
|
|
76
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: slackblocks
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 2.5.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Nicholas Lambourne
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Build Slack Block Kit payloads with Ruby values validated against the
|
|
13
|
+
shared slackblocks specification.
|
|
14
|
+
email:
|
|
15
|
+
- dev@ndl.au
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- CHANGELOG.md
|
|
21
|
+
- LICENSE
|
|
22
|
+
- LICENSE.BSD-3-Clause
|
|
23
|
+
- README.md
|
|
24
|
+
- lib/slackblocks.rb
|
|
25
|
+
- lib/slackblocks/components.rb
|
|
26
|
+
- lib/slackblocks/generated/limits.rb
|
|
27
|
+
- lib/slackblocks/generated/models.rb
|
|
28
|
+
- lib/slackblocks/generated/style_flags.rb
|
|
29
|
+
- lib/slackblocks/generated/vocabulary.rb
|
|
30
|
+
- lib/slackblocks/rich_text_style.rb
|
|
31
|
+
- lib/slackblocks/validation_error.rb
|
|
32
|
+
- lib/slackblocks/validator.rb
|
|
33
|
+
- lib/slackblocks/value.rb
|
|
34
|
+
- lib/slackblocks/version.rb
|
|
35
|
+
- sig/slackblocks.rbs
|
|
36
|
+
- sig/slackblocks/generated.rbs
|
|
37
|
+
homepage: https://github.com/nicklambourne/slackblocks
|
|
38
|
+
licenses:
|
|
39
|
+
- MIT
|
|
40
|
+
metadata:
|
|
41
|
+
homepage_uri: https://github.com/nicklambourne/slackblocks
|
|
42
|
+
source_uri: https://github.com/nicklambourne/slackblocks
|
|
43
|
+
changelog_uri: https://github.com/nicklambourne/slackblocks/blob/master/ruby/CHANGELOG.md
|
|
44
|
+
rubygems_mfa_required: 'true'
|
|
45
|
+
rdoc_options: []
|
|
46
|
+
require_paths:
|
|
47
|
+
- lib
|
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '3.3'
|
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '0'
|
|
58
|
+
requirements: []
|
|
59
|
+
rubygems_version: 3.6.9
|
|
60
|
+
specification_version: 4
|
|
61
|
+
summary: Validated Slack Block Kit values and payloads
|
|
62
|
+
test_files: []
|