Skip to content

Commit 27e68a8

Browse files
feat(api): api update
1 parent 2d54bf7 commit 27e68a8

10 files changed

Lines changed: 71 additions & 33 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 94
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock/knock-1081b58ad42a969e5cd51e7c80d7e13fa5bf4973cbf1dfebbef4772caed7be80.yml
3-
openapi_spec_hash: 58773164753990875fff9468a1f16429
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock/knock-6c3b72254f0f994d27c16100e3555edcc6001a3c986519567adcc51cdfe1261c.yml
3+
openapi_spec_hash: 2e6ed3ff848d34fba88d965b06120fd4
44
config_hash: 625db64572b7ee0ee1dd00546e53fc5f

lib/knockapi/models/condition.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ module Operator
4949
EXISTS = :exists
5050
NOT_EXISTS = :not_exists
5151
CONTAINS_ALL = :contains_all
52+
NOT_CONTAINS_ALL = :not_contains_all
5253
IS_TIMESTAMP = :is_timestamp
5354
IS_NOT_TIMESTAMP = :is_not_timestamp
5455
IS_TIMESTAMP_ON_OR_AFTER = :is_timestamp_on_or_after

lib/knockapi/models/message_event.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,19 @@ module Type
6969
MESSAGE_READ = :"message.read"
7070
MESSAGE_SENT = :"message.sent"
7171
MESSAGE_SEEN = :"message.seen"
72-
MESSAGE_CREATED = :"message.created"
72+
MESSAGE_ARCHIVED = :"message.archived"
7373
MESSAGE_QUEUED = :"message.queued"
7474
MESSAGE_DELIVERED = :"message.delivered"
75+
MESSAGE_NOT_SENT = :"message.not_sent"
7576
MESSAGE_BOUNCED = :"message.bounced"
7677
MESSAGE_UNDELIVERED = :"message.undelivered"
77-
MESSAGE_NOT_SENT = :"message.not_sent"
7878
MESSAGE_DELIVERY_ATTEMPTED = :"message.delivery_attempted"
79-
MESSAGE_ARCHIVED = :"message.archived"
8079
MESSAGE_LINK_CLICKED = :"message.link_clicked"
8180
MESSAGE_INTERACTED = :"message.interacted"
81+
MESSAGE_UNARCHIVED = :"message.unarchived"
8282
MESSAGE_UNSEEN = :"message.unseen"
8383
MESSAGE_UNREAD = :"message.unread"
84-
MESSAGE_UNARCHIVED = :"message.unarchived"
84+
MESSAGE_CREATED = :"message.created"
8585

8686
# @!method self.values
8787
# @return [Array<Symbol>]

lib/knockapi/models/providers/ms_team_check_auth_response.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,25 @@ class Connection < Knockapi::Internal::Type::BaseModel
2424
# @return [Boolean]
2525
required :ok, Knockapi::Internal::Type::Boolean
2626

27+
# @!attribute ms_teams_tenant_id
28+
# The Microsoft Teams tenant ID for the connected tenant.
29+
#
30+
# @return [String, nil]
31+
optional :ms_teams_tenant_id, String, nil?: true
32+
2733
# @!attribute reason
2834
# The reason for the Microsoft Teams connection if it is not valid.
2935
#
3036
# @return [String, nil]
3137
optional :reason, String, nil?: true
3238

33-
# @!method initialize(ok:, reason: nil)
39+
# @!method initialize(ok:, ms_teams_tenant_id: nil, reason: nil)
3440
# A Microsoft Teams connection object.
3541
#
3642
# @param ok [Boolean] Whether the Microsoft Teams connection is valid.
3743
#
44+
# @param ms_teams_tenant_id [String, nil] The Microsoft Teams tenant ID for the connected tenant.
45+
#
3846
# @param reason [String, nil] The reason for the Microsoft Teams connection if it is not valid.
3947
end
4048
end

rbi/knockapi/models/condition.rbi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ module Knockapi
8484
T.let(:not_exists, Knockapi::Condition::Operator::TaggedSymbol)
8585
CONTAINS_ALL =
8686
T.let(:contains_all, Knockapi::Condition::Operator::TaggedSymbol)
87+
NOT_CONTAINS_ALL =
88+
T.let(:not_contains_all, Knockapi::Condition::Operator::TaggedSymbol)
8789
IS_TIMESTAMP =
8890
T.let(:is_timestamp, Knockapi::Condition::Operator::TaggedSymbol)
8991
IS_NOT_TIMESTAMP =

rbi/knockapi/models/message_event.rbi

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,31 +95,29 @@ module Knockapi
9595
T.let(:"message.sent", Knockapi::MessageEvent::Type::TaggedSymbol)
9696
MESSAGE_SEEN =
9797
T.let(:"message.seen", Knockapi::MessageEvent::Type::TaggedSymbol)
98-
MESSAGE_CREATED =
99-
T.let(:"message.created", Knockapi::MessageEvent::Type::TaggedSymbol)
98+
MESSAGE_ARCHIVED =
99+
T.let(:"message.archived", Knockapi::MessageEvent::Type::TaggedSymbol)
100100
MESSAGE_QUEUED =
101101
T.let(:"message.queued", Knockapi::MessageEvent::Type::TaggedSymbol)
102102
MESSAGE_DELIVERED =
103103
T.let(
104104
:"message.delivered",
105105
Knockapi::MessageEvent::Type::TaggedSymbol
106106
)
107+
MESSAGE_NOT_SENT =
108+
T.let(:"message.not_sent", Knockapi::MessageEvent::Type::TaggedSymbol)
107109
MESSAGE_BOUNCED =
108110
T.let(:"message.bounced", Knockapi::MessageEvent::Type::TaggedSymbol)
109111
MESSAGE_UNDELIVERED =
110112
T.let(
111113
:"message.undelivered",
112114
Knockapi::MessageEvent::Type::TaggedSymbol
113115
)
114-
MESSAGE_NOT_SENT =
115-
T.let(:"message.not_sent", Knockapi::MessageEvent::Type::TaggedSymbol)
116116
MESSAGE_DELIVERY_ATTEMPTED =
117117
T.let(
118118
:"message.delivery_attempted",
119119
Knockapi::MessageEvent::Type::TaggedSymbol
120120
)
121-
MESSAGE_ARCHIVED =
122-
T.let(:"message.archived", Knockapi::MessageEvent::Type::TaggedSymbol)
123121
MESSAGE_LINK_CLICKED =
124122
T.let(
125123
:"message.link_clicked",
@@ -130,15 +128,17 @@ module Knockapi
130128
:"message.interacted",
131129
Knockapi::MessageEvent::Type::TaggedSymbol
132130
)
133-
MESSAGE_UNSEEN =
134-
T.let(:"message.unseen", Knockapi::MessageEvent::Type::TaggedSymbol)
135-
MESSAGE_UNREAD =
136-
T.let(:"message.unread", Knockapi::MessageEvent::Type::TaggedSymbol)
137131
MESSAGE_UNARCHIVED =
138132
T.let(
139133
:"message.unarchived",
140134
Knockapi::MessageEvent::Type::TaggedSymbol
141135
)
136+
MESSAGE_UNSEEN =
137+
T.let(:"message.unseen", Knockapi::MessageEvent::Type::TaggedSymbol)
138+
MESSAGE_UNREAD =
139+
T.let(:"message.unread", Knockapi::MessageEvent::Type::TaggedSymbol)
140+
MESSAGE_CREATED =
141+
T.let(:"message.created", Knockapi::MessageEvent::Type::TaggedSymbol)
142142

143143
sig do
144144
override.returns(T::Array[Knockapi::MessageEvent::Type::TaggedSymbol])

rbi/knockapi/models/providers/ms_team_check_auth_response.rbi

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,40 @@ module Knockapi
6565
sig { returns(T::Boolean) }
6666
attr_accessor :ok
6767

68+
# The Microsoft Teams tenant ID for the connected tenant.
69+
sig { returns(T.nilable(String)) }
70+
attr_accessor :ms_teams_tenant_id
71+
6872
# The reason for the Microsoft Teams connection if it is not valid.
6973
sig { returns(T.nilable(String)) }
7074
attr_accessor :reason
7175

7276
# A Microsoft Teams connection object.
7377
sig do
74-
params(ok: T::Boolean, reason: T.nilable(String)).returns(
75-
T.attached_class
76-
)
78+
params(
79+
ok: T::Boolean,
80+
ms_teams_tenant_id: T.nilable(String),
81+
reason: T.nilable(String)
82+
).returns(T.attached_class)
7783
end
7884
def self.new(
7985
# Whether the Microsoft Teams connection is valid.
8086
ok:,
87+
# The Microsoft Teams tenant ID for the connected tenant.
88+
ms_teams_tenant_id: nil,
8189
# The reason for the Microsoft Teams connection if it is not valid.
8290
reason: nil
8391
)
8492
end
8593

8694
sig do
87-
override.returns({ ok: T::Boolean, reason: T.nilable(String) })
95+
override.returns(
96+
{
97+
ok: T::Boolean,
98+
ms_teams_tenant_id: T.nilable(String),
99+
reason: T.nilable(String)
100+
}
101+
)
88102
end
89103
def to_hash
90104
end

sig/knockapi/models/condition.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module Knockapi
4040
| :exists
4141
| :not_exists
4242
| :contains_all
43+
| :not_contains_all
4344
| :is_timestamp
4445
| :is_not_timestamp
4546
| :is_timestamp_on_or_after
@@ -67,6 +68,7 @@ module Knockapi
6768
EXISTS: :exists
6869
NOT_EXISTS: :not_exists
6970
CONTAINS_ALL: :contains_all
71+
NOT_CONTAINS_ALL: :not_contains_all
7072
IS_TIMESTAMP: :is_timestamp
7173
IS_NOT_TIMESTAMP: :is_not_timestamp
7274
IS_TIMESTAMP_ON_OR_AFTER: :is_timestamp_on_or_after

sig/knockapi/models/message_event.rbs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,39 @@ module Knockapi
4545
:"message.read"
4646
| :"message.sent"
4747
| :"message.seen"
48-
| :"message.created"
48+
| :"message.archived"
4949
| :"message.queued"
5050
| :"message.delivered"
51+
| :"message.not_sent"
5152
| :"message.bounced"
5253
| :"message.undelivered"
53-
| :"message.not_sent"
5454
| :"message.delivery_attempted"
55-
| :"message.archived"
5655
| :"message.link_clicked"
5756
| :"message.interacted"
57+
| :"message.unarchived"
5858
| :"message.unseen"
5959
| :"message.unread"
60-
| :"message.unarchived"
60+
| :"message.created"
6161

6262
module Type
6363
extend Knockapi::Internal::Type::Enum
6464

6565
MESSAGE_READ: :"message.read"
6666
MESSAGE_SENT: :"message.sent"
6767
MESSAGE_SEEN: :"message.seen"
68-
MESSAGE_CREATED: :"message.created"
68+
MESSAGE_ARCHIVED: :"message.archived"
6969
MESSAGE_QUEUED: :"message.queued"
7070
MESSAGE_DELIVERED: :"message.delivered"
71+
MESSAGE_NOT_SENT: :"message.not_sent"
7172
MESSAGE_BOUNCED: :"message.bounced"
7273
MESSAGE_UNDELIVERED: :"message.undelivered"
73-
MESSAGE_NOT_SENT: :"message.not_sent"
7474
MESSAGE_DELIVERY_ATTEMPTED: :"message.delivery_attempted"
75-
MESSAGE_ARCHIVED: :"message.archived"
7675
MESSAGE_LINK_CLICKED: :"message.link_clicked"
7776
MESSAGE_INTERACTED: :"message.interacted"
77+
MESSAGE_UNARCHIVED: :"message.unarchived"
7878
MESSAGE_UNSEEN: :"message.unseen"
7979
MESSAGE_UNREAD: :"message.unread"
80-
MESSAGE_UNARCHIVED: :"message.unarchived"
80+
MESSAGE_CREATED: :"message.created"
8181

8282
def self?.values: -> ::Array[Knockapi::Models::MessageEvent::type_]
8383
end

sig/knockapi/models/providers/ms_team_check_auth_response.rbs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,27 @@ module Knockapi
1717
connection: Knockapi::Models::Providers::MsTeamCheckAuthResponse::Connection
1818
}
1919

20-
type connection = { ok: bool, reason: String? }
20+
type connection =
21+
{ ok: bool, ms_teams_tenant_id: String?, reason: String? }
2122

2223
class Connection < Knockapi::Internal::Type::BaseModel
2324
attr_accessor ok: bool
2425

25-
attr_accessor reason: String?
26+
attr_accessor ms_teams_tenant_id: String?
2627

27-
def initialize: (ok: bool, ?reason: String?) -> void
28+
attr_accessor reason: String?
2829

29-
def to_hash: -> { ok: bool, reason: String? }
30+
def initialize: (
31+
ok: bool,
32+
?ms_teams_tenant_id: String?,
33+
?reason: String?
34+
) -> void
35+
36+
def to_hash: -> {
37+
ok: bool,
38+
ms_teams_tenant_id: String?,
39+
reason: String?
40+
}
3041
end
3142
end
3243
end

0 commit comments

Comments
 (0)