trycourier 4.12.0 → 4.13.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/courier/client.rb +4 -0
- data/lib/courier/models/digest_category.rb +53 -0
- data/lib/courier/models/digest_instance.rb +98 -0
- data/lib/courier/models/digest_instance_list_response.rb +72 -0
- data/lib/courier/models/digests/schedule_list_instances_params.rb +43 -0
- data/lib/courier/models/digests/schedule_release_params.rb +22 -0
- data/lib/courier/models.rb +8 -0
- data/lib/courier/resources/digests/schedules.rb +72 -0
- data/lib/courier/resources/digests.rb +18 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +7 -0
- data/rbi/courier/client.rbi +3 -0
- data/rbi/courier/models/digest_category.rbi +82 -0
- data/rbi/courier/models/digest_instance.rbi +138 -0
- data/rbi/courier/models/digest_instance_list_response.rbi +104 -0
- data/rbi/courier/models/digests/schedule_list_instances_params.rbi +70 -0
- data/rbi/courier/models/digests/schedule_release_params.rbi +40 -0
- data/rbi/courier/models.rbi +8 -0
- data/rbi/courier/resources/digests/schedules.rbi +54 -0
- data/rbi/courier/resources/digests.rbi +15 -0
- data/sig/courier/client.rbs +2 -0
- data/sig/courier/models/digest_category.rbs +46 -0
- data/sig/courier/models/digest_instance.rbs +83 -0
- data/sig/courier/models/digest_instance_list_response.rbs +57 -0
- data/sig/courier/models/digests/schedule_list_instances_params.rbs +38 -0
- data/sig/courier/models/digests/schedule_release_params.rbs +25 -0
- data/sig/courier/models.rbs +8 -0
- data/sig/courier/resources/digests/schedules.rbs +21 -0
- data/sig/courier/resources/digests.rbs +9 -0
- metadata +23 -2
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class DigestInstance < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::DigestInstance, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A unique identifier for the digest instance.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :digest_instance_id
|
|
14
|
+
|
|
15
|
+
# The total number of events received for this instance.
|
|
16
|
+
sig { returns(Integer) }
|
|
17
|
+
attr_accessor :event_count
|
|
18
|
+
|
|
19
|
+
# The status of the digest instance. `IN_PROGRESS` instances are still
|
|
20
|
+
# accumulating events; `COMPLETED` instances have been released.
|
|
21
|
+
sig { returns(Courier::DigestInstance::Status::TaggedSymbol) }
|
|
22
|
+
attr_accessor :status
|
|
23
|
+
|
|
24
|
+
# The ID of the user this digest instance belongs to.
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :user_id
|
|
27
|
+
|
|
28
|
+
# The categories configured for the digest.
|
|
29
|
+
sig { returns(T.nilable(T::Array[Courier::DigestCategory])) }
|
|
30
|
+
attr_reader :categories
|
|
31
|
+
|
|
32
|
+
sig { params(categories: T::Array[Courier::DigestCategory::OrHash]).void }
|
|
33
|
+
attr_writer :categories
|
|
34
|
+
|
|
35
|
+
# A map of category key to the number of events received for that category.
|
|
36
|
+
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
|
37
|
+
attr_reader :category_key_counts
|
|
38
|
+
|
|
39
|
+
sig { params(category_key_counts: T::Hash[Symbol, Integer]).void }
|
|
40
|
+
attr_writer :category_key_counts
|
|
41
|
+
|
|
42
|
+
# An ISO 8601 timestamp of when the digest instance was created.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_reader :created_at
|
|
45
|
+
|
|
46
|
+
sig { params(created_at: String).void }
|
|
47
|
+
attr_writer :created_at
|
|
48
|
+
|
|
49
|
+
# Whether the digest instance has been disabled.
|
|
50
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
51
|
+
attr_reader :disabled
|
|
52
|
+
|
|
53
|
+
sig { params(disabled: T::Boolean).void }
|
|
54
|
+
attr_writer :disabled
|
|
55
|
+
|
|
56
|
+
# The ID of the tenant this digest instance belongs to, if any.
|
|
57
|
+
sig { returns(T.nilable(String)) }
|
|
58
|
+
attr_accessor :tenant_id
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
digest_instance_id: String,
|
|
63
|
+
event_count: Integer,
|
|
64
|
+
status: Courier::DigestInstance::Status::OrSymbol,
|
|
65
|
+
user_id: String,
|
|
66
|
+
categories: T::Array[Courier::DigestCategory::OrHash],
|
|
67
|
+
category_key_counts: T::Hash[Symbol, Integer],
|
|
68
|
+
created_at: String,
|
|
69
|
+
disabled: T::Boolean,
|
|
70
|
+
tenant_id: T.nilable(String)
|
|
71
|
+
).returns(T.attached_class)
|
|
72
|
+
end
|
|
73
|
+
def self.new(
|
|
74
|
+
# A unique identifier for the digest instance.
|
|
75
|
+
digest_instance_id:,
|
|
76
|
+
# The total number of events received for this instance.
|
|
77
|
+
event_count:,
|
|
78
|
+
# The status of the digest instance. `IN_PROGRESS` instances are still
|
|
79
|
+
# accumulating events; `COMPLETED` instances have been released.
|
|
80
|
+
status:,
|
|
81
|
+
# The ID of the user this digest instance belongs to.
|
|
82
|
+
user_id:,
|
|
83
|
+
# The categories configured for the digest.
|
|
84
|
+
categories: nil,
|
|
85
|
+
# A map of category key to the number of events received for that category.
|
|
86
|
+
category_key_counts: nil,
|
|
87
|
+
# An ISO 8601 timestamp of when the digest instance was created.
|
|
88
|
+
created_at: nil,
|
|
89
|
+
# Whether the digest instance has been disabled.
|
|
90
|
+
disabled: nil,
|
|
91
|
+
# The ID of the tenant this digest instance belongs to, if any.
|
|
92
|
+
tenant_id: nil
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
override.returns(
|
|
98
|
+
{
|
|
99
|
+
digest_instance_id: String,
|
|
100
|
+
event_count: Integer,
|
|
101
|
+
status: Courier::DigestInstance::Status::TaggedSymbol,
|
|
102
|
+
user_id: String,
|
|
103
|
+
categories: T::Array[Courier::DigestCategory],
|
|
104
|
+
category_key_counts: T::Hash[Symbol, Integer],
|
|
105
|
+
created_at: String,
|
|
106
|
+
disabled: T::Boolean,
|
|
107
|
+
tenant_id: T.nilable(String)
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
def to_hash
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# The status of the digest instance. `IN_PROGRESS` instances are still
|
|
115
|
+
# accumulating events; `COMPLETED` instances have been released.
|
|
116
|
+
module Status
|
|
117
|
+
extend Courier::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
TaggedSymbol =
|
|
120
|
+
T.type_alias { T.all(Symbol, Courier::DigestInstance::Status) }
|
|
121
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
122
|
+
|
|
123
|
+
IN_PROGRESS =
|
|
124
|
+
T.let(:IN_PROGRESS, Courier::DigestInstance::Status::TaggedSymbol)
|
|
125
|
+
COMPLETED =
|
|
126
|
+
T.let(:COMPLETED, Courier::DigestInstance::Status::TaggedSymbol)
|
|
127
|
+
|
|
128
|
+
sig do
|
|
129
|
+
override.returns(
|
|
130
|
+
T::Array[Courier::DigestInstance::Status::TaggedSymbol]
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
def self.values
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class DigestInstanceListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::DigestInstanceListResponse, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Whether there are more digest instances to fetch using the cursor.
|
|
12
|
+
sig { returns(T::Boolean) }
|
|
13
|
+
attr_accessor :has_more
|
|
14
|
+
|
|
15
|
+
# The digest instances for this page of results.
|
|
16
|
+
sig { returns(T::Array[Courier::DigestInstance]) }
|
|
17
|
+
attr_accessor :items
|
|
18
|
+
|
|
19
|
+
# Always `list` for a paginated list response.
|
|
20
|
+
sig { returns(Courier::DigestInstanceListResponse::Type::TaggedSymbol) }
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
# A cursor token for fetching the next page of results, or null when there are
|
|
24
|
+
# none.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :cursor
|
|
27
|
+
|
|
28
|
+
# The path to fetch the next page of results, or null when there are none.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_accessor :next_url
|
|
31
|
+
|
|
32
|
+
# The path of the current request.
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :url
|
|
35
|
+
|
|
36
|
+
sig { params(url: String).void }
|
|
37
|
+
attr_writer :url
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
has_more: T::Boolean,
|
|
42
|
+
items: T::Array[Courier::DigestInstance::OrHash],
|
|
43
|
+
type: Courier::DigestInstanceListResponse::Type::OrSymbol,
|
|
44
|
+
cursor: T.nilable(String),
|
|
45
|
+
next_url: T.nilable(String),
|
|
46
|
+
url: String
|
|
47
|
+
).returns(T.attached_class)
|
|
48
|
+
end
|
|
49
|
+
def self.new(
|
|
50
|
+
# Whether there are more digest instances to fetch using the cursor.
|
|
51
|
+
has_more:,
|
|
52
|
+
# The digest instances for this page of results.
|
|
53
|
+
items:,
|
|
54
|
+
# Always `list` for a paginated list response.
|
|
55
|
+
type:,
|
|
56
|
+
# A cursor token for fetching the next page of results, or null when there are
|
|
57
|
+
# none.
|
|
58
|
+
cursor: nil,
|
|
59
|
+
# The path to fetch the next page of results, or null when there are none.
|
|
60
|
+
next_url: nil,
|
|
61
|
+
# The path of the current request.
|
|
62
|
+
url: nil
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
override.returns(
|
|
68
|
+
{
|
|
69
|
+
has_more: T::Boolean,
|
|
70
|
+
items: T::Array[Courier::DigestInstance],
|
|
71
|
+
type: Courier::DigestInstanceListResponse::Type::TaggedSymbol,
|
|
72
|
+
cursor: T.nilable(String),
|
|
73
|
+
next_url: T.nilable(String),
|
|
74
|
+
url: String
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
def to_hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Always `list` for a paginated list response.
|
|
82
|
+
module Type
|
|
83
|
+
extend Courier::Internal::Type::Enum
|
|
84
|
+
|
|
85
|
+
TaggedSymbol =
|
|
86
|
+
T.type_alias do
|
|
87
|
+
T.all(Symbol, Courier::DigestInstanceListResponse::Type)
|
|
88
|
+
end
|
|
89
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
90
|
+
|
|
91
|
+
LIST =
|
|
92
|
+
T.let(:list, Courier::DigestInstanceListResponse::Type::TaggedSymbol)
|
|
93
|
+
|
|
94
|
+
sig do
|
|
95
|
+
override.returns(
|
|
96
|
+
T::Array[Courier::DigestInstanceListResponse::Type::TaggedSymbol]
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
def self.values
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Digests
|
|
6
|
+
class ScheduleListInstancesParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Digests::ScheduleListInstancesParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :schedule_id
|
|
20
|
+
|
|
21
|
+
# A cursor token from a previous response, used to fetch the next page of results.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :cursor
|
|
24
|
+
|
|
25
|
+
sig { params(cursor: String).void }
|
|
26
|
+
attr_writer :cursor
|
|
27
|
+
|
|
28
|
+
# The maximum number of digest instances to return. Defaults to 20, with a maximum
|
|
29
|
+
# of 100.
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :limit
|
|
32
|
+
|
|
33
|
+
sig { params(limit: Integer).void }
|
|
34
|
+
attr_writer :limit
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
schedule_id: String,
|
|
39
|
+
cursor: String,
|
|
40
|
+
limit: Integer,
|
|
41
|
+
request_options: Courier::RequestOptions::OrHash
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
schedule_id:,
|
|
46
|
+
# A cursor token from a previous response, used to fetch the next page of results.
|
|
47
|
+
cursor: nil,
|
|
48
|
+
# The maximum number of digest instances to return. Defaults to 20, with a maximum
|
|
49
|
+
# of 100.
|
|
50
|
+
limit: nil,
|
|
51
|
+
request_options: {}
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
schedule_id: String,
|
|
59
|
+
cursor: String,
|
|
60
|
+
limit: Integer,
|
|
61
|
+
request_options: Courier::RequestOptions
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Digests
|
|
6
|
+
class ScheduleReleaseParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Digests::ScheduleReleaseParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :schedule_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
schedule_id: String,
|
|
24
|
+
request_options: Courier::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(schedule_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ schedule_id: String, request_options: Courier::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -103,6 +103,14 @@ module Courier
|
|
|
103
103
|
|
|
104
104
|
DeviceType = Courier::Models::DeviceType
|
|
105
105
|
|
|
106
|
+
DigestCategory = Courier::Models::DigestCategory
|
|
107
|
+
|
|
108
|
+
DigestInstance = Courier::Models::DigestInstance
|
|
109
|
+
|
|
110
|
+
DigestInstanceListResponse = Courier::Models::DigestInstanceListResponse
|
|
111
|
+
|
|
112
|
+
Digests = Courier::Models::Digests
|
|
113
|
+
|
|
106
114
|
Discord = Courier::Models::Discord
|
|
107
115
|
|
|
108
116
|
ElementalActionNodeWithType = Courier::Models::ElementalActionNodeWithType
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Digests
|
|
6
|
+
class Schedules
|
|
7
|
+
# List the digest instances for a schedule. Each instance represents the events
|
|
8
|
+
# accumulated for a single user against the schedule, and can be used to monitor
|
|
9
|
+
# digest accumulation before the digest is released.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
schedule_id: String,
|
|
13
|
+
cursor: String,
|
|
14
|
+
limit: Integer,
|
|
15
|
+
request_options: Courier::RequestOptions::OrHash
|
|
16
|
+
).returns(Courier::DigestInstanceListResponse)
|
|
17
|
+
end
|
|
18
|
+
def list_instances(
|
|
19
|
+
# The ID of the digest schedule, in the form `sch/{uuid}`. The value must be
|
|
20
|
+
# URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`).
|
|
21
|
+
schedule_id,
|
|
22
|
+
# A cursor token from a previous response, used to fetch the next page of results.
|
|
23
|
+
cursor: nil,
|
|
24
|
+
# The maximum number of digest instances to return. Defaults to 20, with a maximum
|
|
25
|
+
# of 100.
|
|
26
|
+
limit: nil,
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Send a digest now instead of waiting for its scheduled time, so your users get
|
|
32
|
+
# what they have collected so far right away.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
schedule_id: String,
|
|
36
|
+
request_options: Courier::RequestOptions::OrHash
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
39
|
+
def release(
|
|
40
|
+
# The ID of the digest schedule to release, in the form `sch/{uuid}`. The value
|
|
41
|
+
# must be URL-encoded (e.g. `sch%2F00000000-0000-0000-0000-000000000000`).
|
|
42
|
+
schedule_id,
|
|
43
|
+
request_options: {}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @api private
|
|
48
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
49
|
+
def self.new(client:)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Digests
|
|
6
|
+
sig { returns(Courier::Resources::Digests::Schedules) }
|
|
7
|
+
attr_reader :schedules
|
|
8
|
+
|
|
9
|
+
# @api private
|
|
10
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
11
|
+
def self.new(client:)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/sig/courier/client.rbs
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_category =
|
|
4
|
+
{
|
|
5
|
+
category_key: String,
|
|
6
|
+
retain: Courier::Models::DigestCategory::retain,
|
|
7
|
+
sort_key: String
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class DigestCategory < Courier::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor category_key: String
|
|
12
|
+
|
|
13
|
+
attr_accessor retain: Courier::Models::DigestCategory::retain
|
|
14
|
+
|
|
15
|
+
attr_reader sort_key: String?
|
|
16
|
+
|
|
17
|
+
def sort_key=: (String) -> String
|
|
18
|
+
|
|
19
|
+
def initialize: (
|
|
20
|
+
category_key: String,
|
|
21
|
+
retain: Courier::Models::DigestCategory::retain,
|
|
22
|
+
?sort_key: String
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
category_key: String,
|
|
27
|
+
retain: Courier::Models::DigestCategory::retain,
|
|
28
|
+
sort_key: String
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type retain = :first | :last | :highest | :lowest | :none
|
|
32
|
+
|
|
33
|
+
module Retain
|
|
34
|
+
extend Courier::Internal::Type::Enum
|
|
35
|
+
|
|
36
|
+
FIRST: :first
|
|
37
|
+
LAST: :last
|
|
38
|
+
HIGHEST: :highest
|
|
39
|
+
LOWEST: :lowest
|
|
40
|
+
NONE: :none
|
|
41
|
+
|
|
42
|
+
def self?.values: -> ::Array[Courier::Models::DigestCategory::retain]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_instance =
|
|
4
|
+
{
|
|
5
|
+
digest_instance_id: String,
|
|
6
|
+
event_count: Integer,
|
|
7
|
+
status: Courier::Models::DigestInstance::status,
|
|
8
|
+
user_id: String,
|
|
9
|
+
categories: ::Array[Courier::DigestCategory],
|
|
10
|
+
category_key_counts: ::Hash[Symbol, Integer],
|
|
11
|
+
created_at: String,
|
|
12
|
+
disabled: bool,
|
|
13
|
+
tenant_id: String?
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class DigestInstance < Courier::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor digest_instance_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor event_count: Integer
|
|
20
|
+
|
|
21
|
+
attr_accessor status: Courier::Models::DigestInstance::status
|
|
22
|
+
|
|
23
|
+
attr_accessor user_id: String
|
|
24
|
+
|
|
25
|
+
attr_reader categories: ::Array[Courier::DigestCategory]?
|
|
26
|
+
|
|
27
|
+
def categories=: (
|
|
28
|
+
::Array[Courier::DigestCategory]
|
|
29
|
+
) -> ::Array[Courier::DigestCategory]
|
|
30
|
+
|
|
31
|
+
attr_reader category_key_counts: ::Hash[Symbol, Integer]?
|
|
32
|
+
|
|
33
|
+
def category_key_counts=: (
|
|
34
|
+
::Hash[Symbol, Integer]
|
|
35
|
+
) -> ::Hash[Symbol, Integer]
|
|
36
|
+
|
|
37
|
+
attr_reader created_at: String?
|
|
38
|
+
|
|
39
|
+
def created_at=: (String) -> String
|
|
40
|
+
|
|
41
|
+
attr_reader disabled: bool?
|
|
42
|
+
|
|
43
|
+
def disabled=: (bool) -> bool
|
|
44
|
+
|
|
45
|
+
attr_accessor tenant_id: String?
|
|
46
|
+
|
|
47
|
+
def initialize: (
|
|
48
|
+
digest_instance_id: String,
|
|
49
|
+
event_count: Integer,
|
|
50
|
+
status: Courier::Models::DigestInstance::status,
|
|
51
|
+
user_id: String,
|
|
52
|
+
?categories: ::Array[Courier::DigestCategory],
|
|
53
|
+
?category_key_counts: ::Hash[Symbol, Integer],
|
|
54
|
+
?created_at: String,
|
|
55
|
+
?disabled: bool,
|
|
56
|
+
?tenant_id: String?
|
|
57
|
+
) -> void
|
|
58
|
+
|
|
59
|
+
def to_hash: -> {
|
|
60
|
+
digest_instance_id: String,
|
|
61
|
+
event_count: Integer,
|
|
62
|
+
status: Courier::Models::DigestInstance::status,
|
|
63
|
+
user_id: String,
|
|
64
|
+
categories: ::Array[Courier::DigestCategory],
|
|
65
|
+
category_key_counts: ::Hash[Symbol, Integer],
|
|
66
|
+
created_at: String,
|
|
67
|
+
disabled: bool,
|
|
68
|
+
tenant_id: String?
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type status = :IN_PROGRESS | :COMPLETED
|
|
72
|
+
|
|
73
|
+
module Status
|
|
74
|
+
extend Courier::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
IN_PROGRESS: :IN_PROGRESS
|
|
77
|
+
COMPLETED: :COMPLETED
|
|
78
|
+
|
|
79
|
+
def self?.values: -> ::Array[Courier::Models::DigestInstance::status]
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type digest_instance_list_response =
|
|
4
|
+
{
|
|
5
|
+
has_more: bool,
|
|
6
|
+
items: ::Array[Courier::DigestInstance],
|
|
7
|
+
type: Courier::Models::DigestInstanceListResponse::type_,
|
|
8
|
+
cursor: String?,
|
|
9
|
+
next_url: String?,
|
|
10
|
+
url: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class DigestInstanceListResponse < Courier::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor has_more: bool
|
|
15
|
+
|
|
16
|
+
attr_accessor items: ::Array[Courier::DigestInstance]
|
|
17
|
+
|
|
18
|
+
attr_accessor type: Courier::Models::DigestInstanceListResponse::type_
|
|
19
|
+
|
|
20
|
+
attr_accessor cursor: String?
|
|
21
|
+
|
|
22
|
+
attr_accessor next_url: String?
|
|
23
|
+
|
|
24
|
+
attr_reader url: String?
|
|
25
|
+
|
|
26
|
+
def url=: (String) -> String
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
has_more: bool,
|
|
30
|
+
items: ::Array[Courier::DigestInstance],
|
|
31
|
+
type: Courier::Models::DigestInstanceListResponse::type_,
|
|
32
|
+
?cursor: String?,
|
|
33
|
+
?next_url: String?,
|
|
34
|
+
?url: String
|
|
35
|
+
) -> void
|
|
36
|
+
|
|
37
|
+
def to_hash: -> {
|
|
38
|
+
has_more: bool,
|
|
39
|
+
items: ::Array[Courier::DigestInstance],
|
|
40
|
+
type: Courier::Models::DigestInstanceListResponse::type_,
|
|
41
|
+
cursor: String?,
|
|
42
|
+
next_url: String?,
|
|
43
|
+
url: String
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type type_ = :list
|
|
47
|
+
|
|
48
|
+
module Type
|
|
49
|
+
extend Courier::Internal::Type::Enum
|
|
50
|
+
|
|
51
|
+
LIST: :list
|
|
52
|
+
|
|
53
|
+
def self?.values: -> ::Array[Courier::Models::DigestInstanceListResponse::type_]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Digests
|
|
4
|
+
type schedule_list_instances_params =
|
|
5
|
+
{ schedule_id: String, cursor: String, limit: Integer }
|
|
6
|
+
& Courier::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class ScheduleListInstancesParams < Courier::Internal::Type::BaseModel
|
|
9
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Courier::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor schedule_id: String
|
|
13
|
+
|
|
14
|
+
attr_reader cursor: String?
|
|
15
|
+
|
|
16
|
+
def cursor=: (String) -> String
|
|
17
|
+
|
|
18
|
+
attr_reader limit: Integer?
|
|
19
|
+
|
|
20
|
+
def limit=: (Integer) -> Integer
|
|
21
|
+
|
|
22
|
+
def initialize: (
|
|
23
|
+
schedule_id: String,
|
|
24
|
+
?cursor: String,
|
|
25
|
+
?limit: Integer,
|
|
26
|
+
?request_options: Courier::request_opts
|
|
27
|
+
) -> void
|
|
28
|
+
|
|
29
|
+
def to_hash: -> {
|
|
30
|
+
schedule_id: String,
|
|
31
|
+
cursor: String,
|
|
32
|
+
limit: Integer,
|
|
33
|
+
request_options: Courier::RequestOptions
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
module Digests
|
|
4
|
+
type schedule_release_params =
|
|
5
|
+
{ schedule_id: String } & Courier::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class ScheduleReleaseParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor schedule_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
schedule_id: String,
|
|
15
|
+
?request_options: Courier::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
schedule_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|