whop_sdk 0.0.24 → 0.0.25

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.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +3 -3
  4. data/lib/whop_sdk/client.rb +12 -0
  5. data/lib/whop_sdk/models/ai_chat_create_params.rb +22 -0
  6. data/lib/whop_sdk/models/ai_chat_create_response.rb +89 -0
  7. data/lib/whop_sdk/models/ai_chat_delete_params.rb +14 -0
  8. data/lib/whop_sdk/models/ai_chat_delete_response.rb +8 -0
  9. data/lib/whop_sdk/models/ai_chat_list_params.rb +46 -0
  10. data/lib/whop_sdk/models/ai_chat_list_response.rb +89 -0
  11. data/lib/whop_sdk/models/ai_chat_retrieve_params.rb +14 -0
  12. data/lib/whop_sdk/models/ai_chat_retrieve_response.rb +89 -0
  13. data/lib/whop_sdk/models/ai_chat_update_params.rb +22 -0
  14. data/lib/whop_sdk/models/ai_chat_update_response.rb +89 -0
  15. data/lib/whop_sdk/models/app_list_params.rb +1 -0
  16. data/lib/whop_sdk/models/company_token_transaction_create_params.rb +69 -0
  17. data/lib/whop_sdk/models/company_token_transaction_create_response.rb +180 -0
  18. data/lib/whop_sdk/models/company_token_transaction_list_params.rb +84 -0
  19. data/lib/whop_sdk/models/company_token_transaction_list_response.rb +180 -0
  20. data/lib/whop_sdk/models/company_token_transaction_retrieve_params.rb +14 -0
  21. data/lib/whop_sdk/models/company_token_transaction_retrieve_response.rb +180 -0
  22. data/lib/whop_sdk/models/dm_member_create_params.rb +30 -0
  23. data/lib/whop_sdk/models/dm_member_create_response.rb +94 -0
  24. data/lib/whop_sdk/models/dm_member_delete_params.rb +14 -0
  25. data/lib/whop_sdk/models/dm_member_delete_response.rb +8 -0
  26. data/lib/whop_sdk/models/dm_member_list_params.rb +54 -0
  27. data/lib/whop_sdk/models/dm_member_list_response.rb +71 -0
  28. data/lib/whop_sdk/models/dm_member_retrieve_params.rb +14 -0
  29. data/lib/whop_sdk/models/dm_member_retrieve_response.rb +94 -0
  30. data/lib/whop_sdk/models/dm_member_update_params.rb +58 -0
  31. data/lib/whop_sdk/models/dm_member_update_response.rb +94 -0
  32. data/lib/whop_sdk/models/message_create_params.rb +9 -1
  33. data/lib/whop_sdk/models/message_delete_params.rb +14 -0
  34. data/lib/whop_sdk/models/message_delete_response.rb +8 -0
  35. data/lib/whop_sdk/models/payment_method_types.rb +1 -0
  36. data/lib/whop_sdk/models/reaction_create_params.rb +10 -1
  37. data/lib/whop_sdk/models/reaction_delete_params.rb +22 -0
  38. data/lib/whop_sdk/models/reaction_delete_response.rb +8 -0
  39. data/lib/whop_sdk/models.rb +30 -0
  40. data/lib/whop_sdk/resources/ai_chats.rb +141 -0
  41. data/lib/whop_sdk/resources/company_token_transactions.rb +121 -0
  42. data/lib/whop_sdk/resources/dm_members.rb +155 -0
  43. data/lib/whop_sdk/resources/messages.rb +27 -1
  44. data/lib/whop_sdk/resources/reactions.rb +34 -1
  45. data/lib/whop_sdk/version.rb +1 -1
  46. data/lib/whop_sdk.rb +33 -0
  47. data/rbi/whop_sdk/client.rbi +9 -0
  48. data/rbi/whop_sdk/models/ai_chat_create_params.rbi +40 -0
  49. data/rbi/whop_sdk/models/ai_chat_create_response.rbi +128 -0
  50. data/rbi/whop_sdk/models/ai_chat_delete_params.rbi +27 -0
  51. data/rbi/whop_sdk/models/ai_chat_delete_response.rbi +7 -0
  52. data/rbi/whop_sdk/models/ai_chat_list_params.rbi +67 -0
  53. data/rbi/whop_sdk/models/ai_chat_list_response.rbi +125 -0
  54. data/rbi/whop_sdk/models/ai_chat_retrieve_params.rbi +27 -0
  55. data/rbi/whop_sdk/models/ai_chat_retrieve_response.rbi +128 -0
  56. data/rbi/whop_sdk/models/ai_chat_update_params.rbi +40 -0
  57. data/rbi/whop_sdk/models/ai_chat_update_response.rbi +128 -0
  58. data/rbi/whop_sdk/models/app_list_params.rbi +2 -0
  59. data/rbi/whop_sdk/models/company_token_transaction_create_params.rbi +92 -0
  60. data/rbi/whop_sdk/models/company_token_transaction_create_response.rbi +308 -0
  61. data/rbi/whop_sdk/models/company_token_transaction_list_params.rbi +146 -0
  62. data/rbi/whop_sdk/models/company_token_transaction_list_response.rbi +308 -0
  63. data/rbi/whop_sdk/models/company_token_transaction_retrieve_params.rbi +30 -0
  64. data/rbi/whop_sdk/models/company_token_transaction_retrieve_response.rbi +312 -0
  65. data/rbi/whop_sdk/models/dm_member_create_params.rbi +51 -0
  66. data/rbi/whop_sdk/models/dm_member_create_response.rbi +179 -0
  67. data/rbi/whop_sdk/models/dm_member_delete_params.rbi +27 -0
  68. data/rbi/whop_sdk/models/dm_member_delete_response.rbi +8 -0
  69. data/rbi/whop_sdk/models/dm_member_list_params.rbi +75 -0
  70. data/rbi/whop_sdk/models/dm_member_list_response.rbi +124 -0
  71. data/rbi/whop_sdk/models/dm_member_retrieve_params.rbi +27 -0
  72. data/rbi/whop_sdk/models/dm_member_retrieve_response.rbi +179 -0
  73. data/rbi/whop_sdk/models/dm_member_update_params.rbi +130 -0
  74. data/rbi/whop_sdk/models/dm_member_update_response.rbi +179 -0
  75. data/rbi/whop_sdk/models/message_create_params.rbi +8 -0
  76. data/rbi/whop_sdk/models/message_delete_params.rbi +27 -0
  77. data/rbi/whop_sdk/models/message_delete_response.rbi +8 -0
  78. data/rbi/whop_sdk/models/payment_method_types.rbi +1 -0
  79. data/rbi/whop_sdk/models/reaction_create_params.rbi +10 -0
  80. data/rbi/whop_sdk/models/reaction_delete_params.rbi +40 -0
  81. data/rbi/whop_sdk/models/reaction_delete_response.rbi +8 -0
  82. data/rbi/whop_sdk/models.rbi +33 -0
  83. data/rbi/whop_sdk/resources/ai_chats.rbi +108 -0
  84. data/rbi/whop_sdk/resources/company_token_transactions.rbi +114 -0
  85. data/rbi/whop_sdk/resources/dm_members.rbi +128 -0
  86. data/rbi/whop_sdk/resources/messages.rbi +21 -0
  87. data/rbi/whop_sdk/resources/reactions.rbi +26 -0
  88. data/sig/whop_sdk/client.rbs +6 -0
  89. data/sig/whop_sdk/models/ai_chat_create_params.rbs +23 -0
  90. data/sig/whop_sdk/models/ai_chat_create_response.rbs +65 -0
  91. data/sig/whop_sdk/models/ai_chat_delete_params.rbs +15 -0
  92. data/sig/whop_sdk/models/ai_chat_delete_response.rbs +5 -0
  93. data/sig/whop_sdk/models/ai_chat_list_params.rbs +36 -0
  94. data/sig/whop_sdk/models/ai_chat_list_response.rbs +65 -0
  95. data/sig/whop_sdk/models/ai_chat_retrieve_params.rbs +15 -0
  96. data/sig/whop_sdk/models/ai_chat_retrieve_response.rbs +65 -0
  97. data/sig/whop_sdk/models/ai_chat_update_params.rbs +23 -0
  98. data/sig/whop_sdk/models/ai_chat_update_response.rbs +65 -0
  99. data/sig/whop_sdk/models/app_list_params.rbs +3 -1
  100. data/sig/whop_sdk/models/company_token_transaction_create_params.rbs +56 -0
  101. data/sig/whop_sdk/models/company_token_transaction_create_response.rbs +115 -0
  102. data/sig/whop_sdk/models/company_token_transaction_list_params.rbs +68 -0
  103. data/sig/whop_sdk/models/company_token_transaction_list_response.rbs +115 -0
  104. data/sig/whop_sdk/models/company_token_transaction_retrieve_params.rbs +15 -0
  105. data/sig/whop_sdk/models/company_token_transaction_retrieve_response.rbs +115 -0
  106. data/sig/whop_sdk/models/dm_member_create_params.rbs +28 -0
  107. data/sig/whop_sdk/models/dm_member_create_response.rbs +71 -0
  108. data/sig/whop_sdk/models/dm_member_delete_params.rbs +15 -0
  109. data/sig/whop_sdk/models/dm_member_delete_response.rbs +5 -0
  110. data/sig/whop_sdk/models/dm_member_list_params.rbs +46 -0
  111. data/sig/whop_sdk/models/dm_member_list_response.rbs +54 -0
  112. data/sig/whop_sdk/models/dm_member_retrieve_params.rbs +15 -0
  113. data/sig/whop_sdk/models/dm_member_retrieve_response.rbs +71 -0
  114. data/sig/whop_sdk/models/dm_member_update_params.rbs +57 -0
  115. data/sig/whop_sdk/models/dm_member_update_response.rbs +71 -0
  116. data/sig/whop_sdk/models/message_create_params.rbs +6 -1
  117. data/sig/whop_sdk/models/message_delete_params.rbs +15 -0
  118. data/sig/whop_sdk/models/message_delete_response.rbs +5 -0
  119. data/sig/whop_sdk/models/payment_method_types.rbs +2 -0
  120. data/sig/whop_sdk/models/reaction_create_params.rbs +5 -1
  121. data/sig/whop_sdk/models/reaction_delete_params.rbs +23 -0
  122. data/sig/whop_sdk/models/reaction_delete_response.rbs +5 -0
  123. data/sig/whop_sdk/models.rbs +30 -0
  124. data/sig/whop_sdk/resources/ai_chats.rbs +33 -0
  125. data/sig/whop_sdk/resources/company_token_transactions.rbs +34 -0
  126. data/sig/whop_sdk/resources/dm_members.rbs +36 -0
  127. data/sig/whop_sdk/resources/messages.rbs +3 -0
  128. data/sig/whop_sdk/resources/reactions.rbs +7 -0
  129. metadata +101 -2
@@ -0,0 +1,128 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatCreateResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::AIChatCreateResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier for the AI chat
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The total number of tokens used in the chat
19
+ sig { returns(String) }
20
+ attr_accessor :blended_token_usage
21
+
22
+ # When the AI chat was created
23
+ sig { returns(Time) }
24
+ attr_accessor :created_at
25
+
26
+ # When the last message was sent
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :last_message_at
29
+
30
+ # The number of messages in the chat
31
+ sig { returns(Integer) }
32
+ attr_accessor :message_count
33
+
34
+ # The title of the AI chat
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :title
37
+
38
+ # When the AI chat was last updated
39
+ sig { returns(Time) }
40
+ attr_accessor :updated_at
41
+
42
+ # The user who owns the AI chat
43
+ sig { returns(WhopSDK::Models::AIChatCreateResponse::User) }
44
+ attr_reader :user
45
+
46
+ sig do
47
+ params(user: WhopSDK::Models::AIChatCreateResponse::User::OrHash).void
48
+ end
49
+ attr_writer :user
50
+
51
+ # An AI chat conversation belonging to a user
52
+ sig do
53
+ params(
54
+ id: String,
55
+ blended_token_usage: String,
56
+ created_at: Time,
57
+ last_message_at: T.nilable(Time),
58
+ message_count: Integer,
59
+ title: T.nilable(String),
60
+ updated_at: Time,
61
+ user: WhopSDK::Models::AIChatCreateResponse::User::OrHash
62
+ ).returns(T.attached_class)
63
+ end
64
+ def self.new(
65
+ # The unique identifier for the AI chat
66
+ id:,
67
+ # The total number of tokens used in the chat
68
+ blended_token_usage:,
69
+ # When the AI chat was created
70
+ created_at:,
71
+ # When the last message was sent
72
+ last_message_at:,
73
+ # The number of messages in the chat
74
+ message_count:,
75
+ # The title of the AI chat
76
+ title:,
77
+ # When the AI chat was last updated
78
+ updated_at:,
79
+ # The user who owns the AI chat
80
+ user:
81
+ )
82
+ end
83
+
84
+ sig do
85
+ override.returns(
86
+ {
87
+ id: String,
88
+ blended_token_usage: String,
89
+ created_at: Time,
90
+ last_message_at: T.nilable(Time),
91
+ message_count: Integer,
92
+ title: T.nilable(String),
93
+ updated_at: Time,
94
+ user: WhopSDK::Models::AIChatCreateResponse::User
95
+ }
96
+ )
97
+ end
98
+ def to_hash
99
+ end
100
+
101
+ class User < WhopSDK::Internal::Type::BaseModel
102
+ OrHash =
103
+ T.type_alias do
104
+ T.any(
105
+ WhopSDK::Models::AIChatCreateResponse::User,
106
+ WhopSDK::Internal::AnyHash
107
+ )
108
+ end
109
+
110
+ # The internal ID of the user.
111
+ sig { returns(String) }
112
+ attr_accessor :id
113
+
114
+ # The user who owns the AI chat
115
+ sig { params(id: String).returns(T.attached_class) }
116
+ def self.new(
117
+ # The internal ID of the user.
118
+ id:
119
+ )
120
+ end
121
+
122
+ sig { override.returns({ id: String }) }
123
+ def to_hash
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatDeleteParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::AIChatDeleteParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: WhopSDK::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,7 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ AIChatDeleteResponse = T.let(T::Boolean, WhopSDK::Internal::Type::Converter)
6
+ end
7
+ end
@@ -0,0 +1,67 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatListParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::AIChatListParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # Returns the elements in the list that come after the specified cursor.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :after
17
+
18
+ # Returns the elements in the list that come before the specified cursor.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :before
21
+
22
+ # Returns the first _n_ elements from the list.
23
+ sig { returns(T.nilable(Integer)) }
24
+ attr_accessor :first
25
+
26
+ # Returns the last _n_ elements from the list.
27
+ sig { returns(T.nilable(Integer)) }
28
+ attr_accessor :last
29
+
30
+ sig do
31
+ params(
32
+ after: T.nilable(String),
33
+ before: T.nilable(String),
34
+ first: T.nilable(Integer),
35
+ last: T.nilable(Integer),
36
+ request_options: WhopSDK::RequestOptions::OrHash
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ # Returns the elements in the list that come after the specified cursor.
41
+ after: nil,
42
+ # Returns the elements in the list that come before the specified cursor.
43
+ before: nil,
44
+ # Returns the first _n_ elements from the list.
45
+ first: nil,
46
+ # Returns the last _n_ elements from the list.
47
+ last: nil,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ sig do
53
+ override.returns(
54
+ {
55
+ after: T.nilable(String),
56
+ before: T.nilable(String),
57
+ first: T.nilable(Integer),
58
+ last: T.nilable(Integer),
59
+ request_options: WhopSDK::RequestOptions
60
+ }
61
+ )
62
+ end
63
+ def to_hash
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,125 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(WhopSDK::Models::AIChatListResponse, WhopSDK::Internal::AnyHash)
9
+ end
10
+
11
+ # The unique identifier for the AI chat
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The total number of tokens used in the chat
16
+ sig { returns(String) }
17
+ attr_accessor :blended_token_usage
18
+
19
+ # When the AI chat was created
20
+ sig { returns(Time) }
21
+ attr_accessor :created_at
22
+
23
+ # When the last message was sent
24
+ sig { returns(T.nilable(Time)) }
25
+ attr_accessor :last_message_at
26
+
27
+ # The number of messages in the chat
28
+ sig { returns(Integer) }
29
+ attr_accessor :message_count
30
+
31
+ # The title of the AI chat
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :title
34
+
35
+ # When the AI chat was last updated
36
+ sig { returns(Time) }
37
+ attr_accessor :updated_at
38
+
39
+ # The user who owns the AI chat
40
+ sig { returns(WhopSDK::Models::AIChatListResponse::User) }
41
+ attr_reader :user
42
+
43
+ sig do
44
+ params(user: WhopSDK::Models::AIChatListResponse::User::OrHash).void
45
+ end
46
+ attr_writer :user
47
+
48
+ # An AI chat conversation belonging to a user
49
+ sig do
50
+ params(
51
+ id: String,
52
+ blended_token_usage: String,
53
+ created_at: Time,
54
+ last_message_at: T.nilable(Time),
55
+ message_count: Integer,
56
+ title: T.nilable(String),
57
+ updated_at: Time,
58
+ user: WhopSDK::Models::AIChatListResponse::User::OrHash
59
+ ).returns(T.attached_class)
60
+ end
61
+ def self.new(
62
+ # The unique identifier for the AI chat
63
+ id:,
64
+ # The total number of tokens used in the chat
65
+ blended_token_usage:,
66
+ # When the AI chat was created
67
+ created_at:,
68
+ # When the last message was sent
69
+ last_message_at:,
70
+ # The number of messages in the chat
71
+ message_count:,
72
+ # The title of the AI chat
73
+ title:,
74
+ # When the AI chat was last updated
75
+ updated_at:,
76
+ # The user who owns the AI chat
77
+ user:
78
+ )
79
+ end
80
+
81
+ sig do
82
+ override.returns(
83
+ {
84
+ id: String,
85
+ blended_token_usage: String,
86
+ created_at: Time,
87
+ last_message_at: T.nilable(Time),
88
+ message_count: Integer,
89
+ title: T.nilable(String),
90
+ updated_at: Time,
91
+ user: WhopSDK::Models::AIChatListResponse::User
92
+ }
93
+ )
94
+ end
95
+ def to_hash
96
+ end
97
+
98
+ class User < WhopSDK::Internal::Type::BaseModel
99
+ OrHash =
100
+ T.type_alias do
101
+ T.any(
102
+ WhopSDK::Models::AIChatListResponse::User,
103
+ WhopSDK::Internal::AnyHash
104
+ )
105
+ end
106
+
107
+ # The internal ID of the user.
108
+ sig { returns(String) }
109
+ attr_accessor :id
110
+
111
+ # The user who owns the AI chat
112
+ sig { params(id: String).returns(T.attached_class) }
113
+ def self.new(
114
+ # The internal ID of the user.
115
+ id:
116
+ )
117
+ end
118
+
119
+ sig { override.returns({ id: String }) }
120
+ def to_hash
121
+ end
122
+ end
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatRetrieveParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::AIChatRetrieveParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: WhopSDK::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,128 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatRetrieveResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::AIChatRetrieveResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier for the AI chat
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The total number of tokens used in the chat
19
+ sig { returns(String) }
20
+ attr_accessor :blended_token_usage
21
+
22
+ # When the AI chat was created
23
+ sig { returns(Time) }
24
+ attr_accessor :created_at
25
+
26
+ # When the last message was sent
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :last_message_at
29
+
30
+ # The number of messages in the chat
31
+ sig { returns(Integer) }
32
+ attr_accessor :message_count
33
+
34
+ # The title of the AI chat
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :title
37
+
38
+ # When the AI chat was last updated
39
+ sig { returns(Time) }
40
+ attr_accessor :updated_at
41
+
42
+ # The user who owns the AI chat
43
+ sig { returns(WhopSDK::Models::AIChatRetrieveResponse::User) }
44
+ attr_reader :user
45
+
46
+ sig do
47
+ params(user: WhopSDK::Models::AIChatRetrieveResponse::User::OrHash).void
48
+ end
49
+ attr_writer :user
50
+
51
+ # An AI chat conversation belonging to a user
52
+ sig do
53
+ params(
54
+ id: String,
55
+ blended_token_usage: String,
56
+ created_at: Time,
57
+ last_message_at: T.nilable(Time),
58
+ message_count: Integer,
59
+ title: T.nilable(String),
60
+ updated_at: Time,
61
+ user: WhopSDK::Models::AIChatRetrieveResponse::User::OrHash
62
+ ).returns(T.attached_class)
63
+ end
64
+ def self.new(
65
+ # The unique identifier for the AI chat
66
+ id:,
67
+ # The total number of tokens used in the chat
68
+ blended_token_usage:,
69
+ # When the AI chat was created
70
+ created_at:,
71
+ # When the last message was sent
72
+ last_message_at:,
73
+ # The number of messages in the chat
74
+ message_count:,
75
+ # The title of the AI chat
76
+ title:,
77
+ # When the AI chat was last updated
78
+ updated_at:,
79
+ # The user who owns the AI chat
80
+ user:
81
+ )
82
+ end
83
+
84
+ sig do
85
+ override.returns(
86
+ {
87
+ id: String,
88
+ blended_token_usage: String,
89
+ created_at: Time,
90
+ last_message_at: T.nilable(Time),
91
+ message_count: Integer,
92
+ title: T.nilable(String),
93
+ updated_at: Time,
94
+ user: WhopSDK::Models::AIChatRetrieveResponse::User
95
+ }
96
+ )
97
+ end
98
+ def to_hash
99
+ end
100
+
101
+ class User < WhopSDK::Internal::Type::BaseModel
102
+ OrHash =
103
+ T.type_alias do
104
+ T.any(
105
+ WhopSDK::Models::AIChatRetrieveResponse::User,
106
+ WhopSDK::Internal::AnyHash
107
+ )
108
+ end
109
+
110
+ # The internal ID of the user.
111
+ sig { returns(String) }
112
+ attr_accessor :id
113
+
114
+ # The user who owns the AI chat
115
+ sig { params(id: String).returns(T.attached_class) }
116
+ def self.new(
117
+ # The internal ID of the user.
118
+ id:
119
+ )
120
+ end
121
+
122
+ sig { override.returns({ id: String }) }
123
+ def to_hash
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel
6
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
7
+ include WhopSDK::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(WhopSDK::AIChatUpdateParams, WhopSDK::Internal::AnyHash)
12
+ end
13
+
14
+ # The new title for the AI chat
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :title
17
+
18
+ sig do
19
+ params(
20
+ title: T.nilable(String),
21
+ request_options: WhopSDK::RequestOptions::OrHash
22
+ ).returns(T.attached_class)
23
+ end
24
+ def self.new(
25
+ # The new title for the AI chat
26
+ title: nil,
27
+ request_options: {}
28
+ )
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ { title: T.nilable(String), request_options: WhopSDK::RequestOptions }
34
+ )
35
+ end
36
+ def to_hash
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,128 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class AIChatUpdateResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::AIChatUpdateResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier for the AI chat
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The total number of tokens used in the chat
19
+ sig { returns(String) }
20
+ attr_accessor :blended_token_usage
21
+
22
+ # When the AI chat was created
23
+ sig { returns(Time) }
24
+ attr_accessor :created_at
25
+
26
+ # When the last message was sent
27
+ sig { returns(T.nilable(Time)) }
28
+ attr_accessor :last_message_at
29
+
30
+ # The number of messages in the chat
31
+ sig { returns(Integer) }
32
+ attr_accessor :message_count
33
+
34
+ # The title of the AI chat
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :title
37
+
38
+ # When the AI chat was last updated
39
+ sig { returns(Time) }
40
+ attr_accessor :updated_at
41
+
42
+ # The user who owns the AI chat
43
+ sig { returns(WhopSDK::Models::AIChatUpdateResponse::User) }
44
+ attr_reader :user
45
+
46
+ sig do
47
+ params(user: WhopSDK::Models::AIChatUpdateResponse::User::OrHash).void
48
+ end
49
+ attr_writer :user
50
+
51
+ # An AI chat conversation belonging to a user
52
+ sig do
53
+ params(
54
+ id: String,
55
+ blended_token_usage: String,
56
+ created_at: Time,
57
+ last_message_at: T.nilable(Time),
58
+ message_count: Integer,
59
+ title: T.nilable(String),
60
+ updated_at: Time,
61
+ user: WhopSDK::Models::AIChatUpdateResponse::User::OrHash
62
+ ).returns(T.attached_class)
63
+ end
64
+ def self.new(
65
+ # The unique identifier for the AI chat
66
+ id:,
67
+ # The total number of tokens used in the chat
68
+ blended_token_usage:,
69
+ # When the AI chat was created
70
+ created_at:,
71
+ # When the last message was sent
72
+ last_message_at:,
73
+ # The number of messages in the chat
74
+ message_count:,
75
+ # The title of the AI chat
76
+ title:,
77
+ # When the AI chat was last updated
78
+ updated_at:,
79
+ # The user who owns the AI chat
80
+ user:
81
+ )
82
+ end
83
+
84
+ sig do
85
+ override.returns(
86
+ {
87
+ id: String,
88
+ blended_token_usage: String,
89
+ created_at: Time,
90
+ last_message_at: T.nilable(Time),
91
+ message_count: Integer,
92
+ title: T.nilable(String),
93
+ updated_at: Time,
94
+ user: WhopSDK::Models::AIChatUpdateResponse::User
95
+ }
96
+ )
97
+ end
98
+ def to_hash
99
+ end
100
+
101
+ class User < WhopSDK::Internal::Type::BaseModel
102
+ OrHash =
103
+ T.type_alias do
104
+ T.any(
105
+ WhopSDK::Models::AIChatUpdateResponse::User,
106
+ WhopSDK::Internal::AnyHash
107
+ )
108
+ end
109
+
110
+ # The internal ID of the user.
111
+ sig { returns(String) }
112
+ attr_accessor :id
113
+
114
+ # The user who owns the AI chat
115
+ sig { params(id: String).returns(T.attached_class) }
116
+ def self.new(
117
+ # The internal ID of the user.
118
+ id:
119
+ )
120
+ end
121
+
122
+ sig { override.returns({ id: String }) }
123
+ def to_hash
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
@@ -129,6 +129,8 @@ module WhopSDK
129
129
  T.type_alias { T.all(Symbol, WhopSDK::AppListParams::Order) }
130
130
  OrSymbol = T.type_alias { T.any(Symbol, String) }
131
131
 
132
+ CREATED_AT =
133
+ T.let(:created_at, WhopSDK::AppListParams::Order::TaggedSymbol)
132
134
  DISCOVERABLE_AT =
133
135
  T.let(:discoverable_at, WhopSDK::AppListParams::Order::TaggedSymbol)
134
136
  TOTAL_INSTALLS_LAST_30_DAYS =