crisp-api 1.1.14 → 1.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1c8bf8ae0ba08e92419ec54f2eeda7a04a2dd804cdbb0a6242a8c5a74f11e9f
4
- data.tar.gz: 07053a401d69f3400fbcc96b41993e3baffa319ba297456da833757214e93a76
3
+ metadata.gz: 9dade31f62a550aecf4414e51b7cf50d8bb31040017a245666e665ce9691cdda
4
+ data.tar.gz: 323a746332b1381ccfab00814f19626f5ca2ed3d7660155e2891ea8c15c221a4
5
5
  SHA512:
6
- metadata.gz: d50484ebfc369c2d02dd74741bbe5eb4f3e13884b7446d39af6808faf39ddf8f72b7b47cee48343eeaf51f7b549af5342dd7eab1df322b832bbe08eeb6c0cbe6
7
- data.tar.gz: b91e9df48d9f8dc6d5bf9a8707b2597cc11649425bd4ec1c26bc00df1ef962fd6b1d92af5b4a10a7dab1aba5e482f6c23de57f851af70b4423fcffc06de6cd04
6
+ metadata.gz: 9e9d4b36ed455b78e79663f569ac2bd9ee4a995e577ebb6457981cb4b2117bcbbbb6c7e752518228e0545c924c6b667db497c1e15441b43eaa37bb976cc2af85
7
+ data.tar.gz: 6f87f1f225daf8faeb74a34a1a471ac6ffec2bdec701244acb9cd27701a4dd7443b3b6fee612d50af76774cfe4cd161e6878344921eadc93a74fa8c30be871f0
data/EXAMPLES.md CHANGED
@@ -65,6 +65,7 @@ https://docs.crisp.chat/references/rest-api/v1/#get-messages-in-conversation
65
65
  website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
66
66
  session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
67
67
 
68
+ # Either 'timestamp_before', 'timestamp_after' or 'timestamp_around'
68
69
  query = {
69
70
  "timestamp_before" => "1687314763164"
70
71
  }
@@ -554,6 +555,44 @@ client.website.batch_inbox_items(website_id, data);
554
555
 
555
556
  =========================
556
557
 
558
+ https://docs.crisp.chat/references/rest-api/v1/#batch-data-items
559
+
560
+ website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
561
+
562
+ data = {
563
+ "sessions" => [
564
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
565
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
566
+ ],
567
+ "data" => {
568
+ "plan" => "pro",
569
+ "subscribed" => true
570
+ }
571
+ }
572
+
573
+ client.website.batch_data_items(website_id, data);
574
+
575
+ =========================
576
+
577
+ https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items
578
+
579
+ website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
580
+
581
+ data = {
582
+ "sessions" => [
583
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
584
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
585
+ ],
586
+ "segments" => [
587
+ "vip",
588
+ "lead"
589
+ ]
590
+ }
591
+
592
+ client.website.batch_segments_items(website_id, data);
593
+
594
+ =========================
595
+
557
596
  https://docs.crisp.chat/references/rest-api/v1/#get-website-availability-status
558
597
 
559
598
  website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
@@ -605,7 +644,6 @@ data = [
605
644
  "emails" => [
606
645
  "rating" => true,
607
646
  "transcript" => true,
608
- "enrich" => true,
609
647
  "junk_filter" => true
610
648
  ],
611
649
  "chatbox" => [
data/README.md CHANGED
@@ -16,7 +16,7 @@ You may follow the [REST API Quickstart](https://docs.crisp.chat/guides/rest-api
16
16
  Add the library to your `Gemfile`:
17
17
 
18
18
  ```bash
19
- gem "crisp-api", "~> 1.1.14"
19
+ gem "crisp-api", "~> 1.1.16"
20
20
  ```
21
21
 
22
22
  Then, import it:
@@ -187,6 +187,11 @@ client.website.send_message_in_conversation(
187
187
  website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
188
188
  session_id = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
189
189
 
190
+ # Either 'timestamp_before', 'timestamp_after' or 'timestamp_around'
191
+ query = {
192
+ "timestamp_before" => "1687314763164"
193
+ }
194
+
190
195
  client.website.get_messages_in_conversation(website_id, session_id, query);
191
196
  ```
192
197
  </details>
@@ -855,6 +860,52 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
855
860
  ```
856
861
  </details>
857
862
 
863
+ * **Batch Data Items**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-data-items)
864
+ * `client.website.batch_data_items(website_id, data)`
865
+ * <details>
866
+ <summary>See Example</summary>
867
+
868
+ ```ruby
869
+ website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
870
+
871
+ data = {
872
+ "sessions" => [
873
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
874
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
875
+ ],
876
+ "data" => {
877
+ "plan" => "pro",
878
+ "subscribed" => true
879
+ }
880
+ }
881
+
882
+ client.website.batch_data_items(website_id, data);
883
+ ```
884
+ </details>
885
+
886
+ * **Batch Segments Items**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#batch-segments-items)
887
+ * `client.website.batch_segments_items(website_id, data)`
888
+ * <details>
889
+ <summary>See Example</summary>
890
+
891
+ ```ruby
892
+ website_id = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
893
+
894
+ data = {
895
+ "sessions" => [
896
+ "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
897
+ "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
898
+ ],
899
+ "segments" => [
900
+ "vip",
901
+ "lead"
902
+ ]
903
+ }
904
+
905
+ client.website.batch_segments_items(website_id, data);
906
+ ```
907
+ </details>
908
+
858
909
 
859
910
  * **Website Availability**
860
911
  * **Get Website Availability Status**: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-website-availability-status)
@@ -932,7 +983,6 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
932
983
  "emails" => [
933
984
  "rating" => true,
934
985
  "transcript" => true,
935
- "enrich" => true,
936
986
  "junk_filter" => true
937
987
  ],
938
988
  "chatbox" => [
data/crisp-api.gemspec CHANGED
@@ -3,7 +3,7 @@ require "date"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "crisp-api"
6
- s.version = "1.1.14"
6
+ s.version = "1.1.16"
7
7
  s.date = Date.today
8
8
  s.summary = "Crisp API Ruby"
9
9
  s.description = "Crisp API Ruby"
data/lib/crisp-api.rb CHANGED
@@ -91,7 +91,7 @@ module Crisp
91
91
  :payload => (data ? data.to_json : nil),
92
92
 
93
93
  :headers => {
94
- :user_agent => "ruby-crisp-api/1.1.14",
94
+ :user_agent => "ruby-crisp-api/1.1.16",
95
95
  :accept => :json,
96
96
  :content_type => :json,
97
97
  "X-Crisp-Tier" => @tier,
@@ -107,6 +107,14 @@ module Crisp
107
107
  return @parent.patch(self._url_website(website_id, "/batch/inbox"), data: data)
108
108
  end
109
109
 
110
+ def batch_data_items(website_id, data)
111
+ return @parent.patch(self._url_website(website_id, "/batch/data"), data: data)
112
+ end
113
+
114
+ def batch_segments_items(website_id, data)
115
+ return @parent.patch(self._url_website(website_id, "/batch/segments"), data: data)
116
+ end
117
+
110
118
  def get_website_availability_status(website_id)
111
119
  return @parent.get(self._url_website(website_id, "/availability/status"))
112
120
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crisp-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.14
4
+ version: 1.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valerian Saliou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-14 00:00:00.000000000 Z
11
+ date: 2026-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client