holivia 0.10.0 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 649b14e43fe74902dab26504ac1eb2ec403d3f7de0357283fb16393cd95e4d84
4
- data.tar.gz: da1363943075ffbab5fa664434666202bc5654785a2e83083e6894c52d270baa
3
+ metadata.gz: 84ddfe49ff566c2f626f07970ac5fa2ff0cc952cdb6f289097e0763076305db6
4
+ data.tar.gz: 8617737191faf7127efbe37451cbbc0fb3c8a237be30a8ddffe6ec437a32f4e3
5
5
  SHA512:
6
- metadata.gz: 497030e934ea60e03348f922f809811ef2f1d1172cd90c9a1b96533a26461d82a2dc6e2938cacf9a4e982ba30de93004edfb9e3f2ac79b9abc27247517312d2c
7
- data.tar.gz: c36fa00ac0e7d9979ab1502a08143795b6ee7b97d3bafee411778d018c5ba96c34074a728cba00d4a44463de43bc96dc2724a6bc32065ea595da049079da491e
6
+ metadata.gz: 43fba8847a1a234f0c64bcf409f42ae0af64e3298e5ed58f42764b85f08506b80914aeea5f9eb7c42621ff3fbba83641beb1f750d170837e23db7042717d7ad3
7
+ data.tar.gz: aeef43e300e7c9977ff147c8c352689540328a6981fa0ae317fe09ba56b82b57789a43e1596a4c06a2b3fcc923a16cfb8118373631b8f06b18a71f2f1d477bf3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.11.0] - 2026-07-26
4
+
5
+ - Add `holivia support-phone-numbers` commands for backoffice support phone number CRUD and filtering
6
+
3
7
  ## [0.10.0] - 2026-07-17
4
8
 
5
9
  - Add repeatable `--topic-id` support to replace or clear topics assigned to selfcare content
@@ -109,6 +109,17 @@ module Holivia
109
109
  holivia collective-intervention delete <id> Delete a collective intervention
110
110
  Status values: submitted, scheduled, in_progress, completed, canceled.
111
111
 
112
+ Support Phone Numbers:
113
+ holivia support-phone-numbers index [--country CODE --provider PROVIDER --support-type TYPE]
114
+ List immediate-support phone numbers
115
+ holivia support-phone-numbers show <id> Show one support phone number
116
+ holivia support-phone-numbers create [options]
117
+ Create a support phone number
118
+ holivia support-phone-numbers update <id> [options]
119
+ Update a support phone number
120
+ holivia support-phone-numbers delete <id>
121
+ Delete a support phone number
122
+
112
123
  Appointments:
113
124
  holivia appointment video-diagnostics <id> Show video diagnostics for an appointment
114
125
 
data/lib/holivia/cli.rb CHANGED
@@ -16,6 +16,7 @@ require_relative "commands/hr_home_highlight"
16
16
  require_relative "commands/enterprise"
17
17
  require_relative "commands/crisis"
18
18
  require_relative "commands/collective_intervention"
19
+ require_relative "commands/support_phone_number"
19
20
 
20
21
  module Holivia
21
22
  class CLI
@@ -34,6 +35,7 @@ module Holivia
34
35
  when "enterprise" then Commands::Enterprise.route(args)
35
36
  when "crisis" then Commands::Crisis.route(args)
36
37
  when "collective-intervention", "collective_intervention", "collective" then Commands::CollectiveIntervention.route(args)
38
+ when "support-phone-numbers" then Commands::SupportPhoneNumber.route(args)
37
39
  when "version", "--version", "-v" then puts "holivia #{Holivia::VERSION}"
38
40
  when "--help", "-h", nil then puts Help::HELP_TEXT
39
41
  else warn "Unknown command: #{command}"
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "base"
4
+
5
+ module Holivia
6
+ module Commands
7
+ class SupportPhoneNumber < Base
8
+ BASE_PATH = "/api/v1/backoffice/support_phone_numbers"
9
+
10
+ def self.route(args)
11
+ subcommand = args.shift
12
+ case subcommand
13
+ when "index" then new.index(args)
14
+ when "show" then new.show(args)
15
+ when "create" then new.create(args)
16
+ when "update" then new.update(args)
17
+ when "delete" then new.delete(args)
18
+ else warn "Unknown support phone numbers command: #{subcommand}"
19
+ exit 1
20
+ end
21
+ end
22
+
23
+ def index(args = [])
24
+ params = {}
25
+ OptionParser.new do |opts|
26
+ opts.banner = "Usage: holivia support-phone-numbers index [options]"
27
+ opts.on("--country CODE") { |v| params[:country_code] = v }
28
+ opts.on("--provider PROVIDER") { |v| params[:provider] = v }
29
+ opts.on("--support-type TYPE") { |v| params[:support_type] = v }
30
+ end.parse!(args)
31
+
32
+ output(client.get(BASE_PATH, params: params))
33
+ end
34
+
35
+ def show(args = [])
36
+ id = args.shift
37
+ abort "Usage: holivia support-phone-numbers show <id>" unless id
38
+
39
+ output(client.get("#{BASE_PATH}/#{id}"))
40
+ end
41
+
42
+ def create(args = [])
43
+ options = parse_write_options(args, "Usage: holivia support-phone-numbers create [options]")
44
+ abort "No options provided. Use --help for usage." if options.empty?
45
+
46
+ output(client.post(BASE_PATH, body: options))
47
+ end
48
+
49
+ def update(args = [])
50
+ id = args.shift
51
+ abort "Usage: holivia support-phone-numbers update <id> [options]" unless id
52
+
53
+ options = parse_write_options(args, "Usage: holivia support-phone-numbers update <id> [options]")
54
+ abort "No options provided. Use --help for usage." if options.empty?
55
+
56
+ output(client.patch("#{BASE_PATH}/#{id}", body: options))
57
+ end
58
+
59
+ def delete(args = [])
60
+ id = args.shift
61
+ abort "Usage: holivia support-phone-numbers delete <id>" unless id
62
+
63
+ client.delete("#{BASE_PATH}/#{id}")
64
+ output(deleted: true, id: id.to_i)
65
+ end
66
+
67
+ private
68
+
69
+ def parse_write_options(args, banner)
70
+ options = {}
71
+ OptionParser.new do |opts|
72
+ opts.banner = banner
73
+ opts.on("--country CODE") { |v| options[:country_code] = v }
74
+ opts.on("--provider PROVIDER") { |v| options[:provider] = v }
75
+ opts.on("--support-type TYPE") { |v| options[:support_type] = v }
76
+ opts.on("--phone-number NUMBER") { |v| options[:phone_number] = v }
77
+ end.parse!(args)
78
+ options.merge(piped_json)
79
+ end
80
+ end
81
+ end
82
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Holivia
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: holivia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Holivia
@@ -81,6 +81,7 @@ files:
81
81
  - lib/holivia/commands/selfcare.rb
82
82
  - lib/holivia/commands/selfcare_objective.rb
83
83
  - lib/holivia/commands/slide.rb
84
+ - lib/holivia/commands/support_phone_number.rb
84
85
  - lib/holivia/config_error.rb
85
86
  - lib/holivia/configuration.rb
86
87
  - lib/holivia/env_manager.rb