diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 35c30adc..81d2de2d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.30.0" + ".": "1.31.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 65a6aaf6..da73acdf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 90 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-6458a8bd2021d6d33af7b8b477bd0bdef7270dd2f78fa7891048d519f0d65b22.yml -openapi_spec_hash: 37319ec82d920729dab3ab05ff75f4fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-27184418cc06dab3a5bb109116c85fa740df9a140150d2eb9f4c73389905b8fb.yml +openapi_spec_hash: 2aad0a6198ffa00d400bce3b8e41d2e5 config_hash: 2b42d138d85c524e65fa7e205d36cc4a diff --git a/CHANGELOG.md b/CHANGELOG.md index b3036259..dc52123a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 1.31.0 (2026-02-19) + +Full Changelog: [v1.30.0...v1.31.0](https://github.com/knocklabs/knock-ruby/compare/v1.30.0...v1.31.0) + +### Features + +* **api:** api update ([dcc8c6c](https://github.com/knocklabs/knock-ruby/commit/dcc8c6c3e141eb231a053dc35325c8bc639068e8)) +* **api:** api update ([2d7ec95](https://github.com/knocklabs/knock-ruby/commit/2d7ec957ddd6b1069ac8aaaa3d7b1c70b456a452)) +* **api:** api update ([f78aef3](https://github.com/knocklabs/knock-ruby/commit/f78aef3b059e14786543f033c8a603da8961e7dc)) +* **api:** api update ([1cd0625](https://github.com/knocklabs/knock-ruby/commit/1cd0625d5420735e1851b16a7af23fe19b41a394)) +* **api:** api update ([3ef0f26](https://github.com/knocklabs/knock-ruby/commit/3ef0f264c2bb77151eca4cd3474c46d318c36749)) +* **api:** api update ([1562c35](https://github.com/knocklabs/knock-ruby/commit/1562c35982e64c0870123987b022cb46490be6f8)) +* **api:** api update ([1381ed5](https://github.com/knocklabs/knock-ruby/commit/1381ed582a7df881d56425ceb8785664ca6130e9)) +* **api:** api update ([0be92ad](https://github.com/knocklabs/knock-ruby/commit/0be92ad96b5f1e973f36fc89fabc2cfdb873cc82)) + + +### Bug Fixes + +* **client:** always add content-length to post body, even when empty ([4cd7959](https://github.com/knocklabs/knock-ruby/commit/4cd79592e97e3fafa21d247ab81a72e4bded4f72)) +* **client:** loosen json header parsing ([6ab2346](https://github.com/knocklabs/knock-ruby/commit/6ab23468b66b8fdf7de9ebe96d49f1400300c00c)) + + +### Chores + +* **docs:** remove www prefix ([5719ce2](https://github.com/knocklabs/knock-ruby/commit/5719ce273d7996e16385184f536facd6fc59c096)) +* update mock server docs ([bc0b313](https://github.com/knocklabs/knock-ruby/commit/bc0b313569f751b55f1d3c2ca69a6942c0b012b8)) + ## 1.30.0 (2026-01-29) Full Changelog: [v1.29.0...v1.30.0](https://github.com/knocklabs/knock-ruby/compare/v1.29.0...v1.30.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd1b6d59..82f6b4c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g To install via git in your `Gemfile`: ```ruby -gem "knockapi", git: "https://www.github.com/knocklabs/knock-ruby" +gem "knockapi", git: "https://github.com/knocklabs/knock-ruby" ``` Alternatively, reference local copy of the repo: ```bash -$ git clone -- 'https://www.github.com/knocklabs/knock-ruby' '' +$ git clone -- 'https://github.com/knocklabs/knock-ruby' '' ``` ```ruby @@ -68,8 +68,8 @@ $ bundle exec rake Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. -```bash -$ npx prism mock path/to/your/openapi.yml +```sh +$ ./scripts/mock ``` ```bash diff --git a/Gemfile.lock b/Gemfile.lock index 2a6673f1..2a340002 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - knockapi (1.30.0) + knockapi (1.31.0) cgi connection_pool diff --git a/README.md b/README.md index 1ad21e63..f42564e3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "knockapi", "~> 1.30.0" +gem "knockapi", "~> 1.31.0" ``` diff --git a/lib/knockapi/internal/transport/pooled_net_requester.rb b/lib/knockapi/internal/transport/pooled_net_requester.rb index 7121b646..3552e9e9 100644 --- a/lib/knockapi/internal/transport/pooled_net_requester.rb +++ b/lib/knockapi/internal/transport/pooled_net_requester.rb @@ -75,7 +75,7 @@ def build_request(request, &blk) case body in nil - nil + req["content-length"] ||= 0 unless req["transfer-encoding"] in String req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"] req.body_stream = Knockapi::Internal::Util::ReadIOAdapter.new(body, &blk) diff --git a/lib/knockapi/internal/util.rb b/lib/knockapi/internal/util.rb index 921a8545..d4ce459b 100644 --- a/lib/knockapi/internal/util.rb +++ b/lib/knockapi/internal/util.rb @@ -485,7 +485,7 @@ def writable_enum(&blk) end # @type [Regexp] - JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)} + JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)} # @type [Regexp] JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)} diff --git a/lib/knockapi/models/audience_add_members_params.rb b/lib/knockapi/models/audience_add_members_params.rb index 851ceaef..a0f94911 100644 --- a/lib/knockapi/models/audience_add_members_params.rb +++ b/lib/knockapi/models/audience_add_members_params.rb @@ -8,13 +8,13 @@ class AudienceAddMembersParams < Knockapi::Internal::Type::BaseModel include Knockapi::Internal::Type::RequestParameters # @!attribute members - # A list of audience members to add. Limited to 1,000 members per request. + # A list of audience members to add. You can add up to 1,000 members per request. # # @return [Array] required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceAddMembersParams::Member] } # @!method initialize(members:, request_options: {}) - # @param members [Array] A list of audience members to add. Limited to 1,000 members per request. + # @param members [Array] A list of audience members to add. You can add up to 1,000 members per request. # # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/knockapi/models/audience_remove_members_params.rb b/lib/knockapi/models/audience_remove_members_params.rb index 82617608..38fba4af 100644 --- a/lib/knockapi/models/audience_remove_members_params.rb +++ b/lib/knockapi/models/audience_remove_members_params.rb @@ -8,13 +8,17 @@ class AudienceRemoveMembersParams < Knockapi::Internal::Type::BaseModel include Knockapi::Internal::Type::RequestParameters # @!attribute members - # A list of audience members to remove. + # A list of audience members to remove. You can remove up to 1,000 members per + # request. # # @return [Array] required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceRemoveMembersParams::Member] } # @!method initialize(members:, request_options: {}) - # @param members [Array] A list of audience members to remove. + # Some parameter documentations has been truncated, see + # {Knockapi::Models::AudienceRemoveMembersParams} for more details. + # + # @param members [Array] A list of audience members to remove. You can remove up to 1,000 members per req # # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/knockapi/models/message_list_params.rb b/lib/knockapi/models/message_list_params.rb index 7554c81d..e951bfff 100644 --- a/lib/knockapi/models/message_list_params.rb +++ b/lib/knockapi/models/message_list_params.rb @@ -147,37 +147,37 @@ module EngagementStatus class InsertedAt < Knockapi::Internal::Type::BaseModel # @!attribute gt - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. # # @return [String, nil] optional :gt, String # @!attribute gte - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. # # @return [String, nil] optional :gte, String # @!attribute lt - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. # # @return [String, nil] optional :lt, String # @!attribute lte - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. # # @return [String, nil] optional :lte, String # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil) - # @param gt [String] Limits the results to messages inserted after the given date. + # @param gt [String] Limits the results to items inserted after the given date. # - # @param gte [String] Limits the results to messages inserted after or on the given date. + # @param gte [String] Limits the results to items inserted after or on the given date. # - # @param lt [String] Limits the results to messages inserted before the given date. + # @param lt [String] Limits the results to items inserted before the given date. # - # @param lte [String] Limits the results to messages inserted before or on the given date. + # @param lte [String] Limits the results to items inserted before or on the given date. end module Status diff --git a/lib/knockapi/models/object_list_messages_params.rb b/lib/knockapi/models/object_list_messages_params.rb index 76a39c6e..6018fd0d 100644 --- a/lib/knockapi/models/object_list_messages_params.rb +++ b/lib/knockapi/models/object_list_messages_params.rb @@ -148,37 +148,37 @@ module EngagementStatus class InsertedAt < Knockapi::Internal::Type::BaseModel # @!attribute gt - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. # # @return [String, nil] optional :gt, String # @!attribute gte - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. # # @return [String, nil] optional :gte, String # @!attribute lt - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. # # @return [String, nil] optional :lt, String # @!attribute lte - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. # # @return [String, nil] optional :lte, String # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil) - # @param gt [String] Limits the results to messages inserted after the given date. + # @param gt [String] Limits the results to items inserted after the given date. # - # @param gte [String] Limits the results to messages inserted after or on the given date. + # @param gte [String] Limits the results to items inserted after or on the given date. # - # @param lt [String] Limits the results to messages inserted before the given date. + # @param lt [String] Limits the results to items inserted before the given date. # - # @param lte [String] Limits the results to messages inserted before or on the given date. + # @param lte [String] Limits the results to items inserted before or on the given date. end module Status diff --git a/lib/knockapi/models/user_list_messages_params.rb b/lib/knockapi/models/user_list_messages_params.rb index aec5afc8..a4990c10 100644 --- a/lib/knockapi/models/user_list_messages_params.rb +++ b/lib/knockapi/models/user_list_messages_params.rb @@ -147,37 +147,37 @@ module EngagementStatus class InsertedAt < Knockapi::Internal::Type::BaseModel # @!attribute gt - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. # # @return [String, nil] optional :gt, String # @!attribute gte - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. # # @return [String, nil] optional :gte, String # @!attribute lt - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. # # @return [String, nil] optional :lt, String # @!attribute lte - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. # # @return [String, nil] optional :lte, String # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil) - # @param gt [String] Limits the results to messages inserted after the given date. + # @param gt [String] Limits the results to items inserted after the given date. # - # @param gte [String] Limits the results to messages inserted after or on the given date. + # @param gte [String] Limits the results to items inserted after or on the given date. # - # @param lt [String] Limits the results to messages inserted before the given date. + # @param lt [String] Limits the results to items inserted before the given date. # - # @param lte [String] Limits the results to messages inserted before or on the given date. + # @param lte [String] Limits the results to items inserted before or on the given date. end module Status diff --git a/lib/knockapi/models/users/feed_list_items_params.rb b/lib/knockapi/models/users/feed_list_items_params.rb index d0ca3cdc..ace67fff 100644 --- a/lib/knockapi/models/users/feed_list_items_params.rb +++ b/lib/knockapi/models/users/feed_list_items_params.rb @@ -26,12 +26,25 @@ class FeedListItemsParams < Knockapi::Internal::Type::BaseModel # @return [String, nil] optional :before, String + # @!attribute exclude + # Comma-separated list of field paths to exclude from the response. Use dot + # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels + # deep. + # + # @return [String, nil] + optional :exclude, String + # @!attribute has_tenant # Whether the feed items have a tenant. # # @return [Boolean, nil] optional :has_tenant, Knockapi::Internal::Type::Boolean + # @!attribute inserted_at + # + # @return [Knockapi::Models::Users::FeedListItemsParams::InsertedAt, nil] + optional :inserted_at, -> { Knockapi::Users::FeedListItemsParams::InsertedAt } + # @!attribute locale # The locale to render the feed items in. Must be in the IETF 5646 format (e.g. # `en-US`). When not provided, will default to the locale that the feed items were @@ -41,6 +54,15 @@ class FeedListItemsParams < Knockapi::Internal::Type::BaseModel # @return [String, nil] optional :locale, String + # @!attribute mode + # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + # `rich`. When `mode` is `compact`, feed items will not have `activities` and + # `total_activities` fields; the `data` field will not include nested arrays and + # objects; and the `actors` field will only have up to one actor. + # + # @return [Symbol, Knockapi::Models::Users::FeedListItemsParams::Mode, nil] + optional :mode, enum: -> { Knockapi::Users::FeedListItemsParams::Mode } + # @!attribute page_size # The number of items per page (defaults to 50). # @@ -77,7 +99,7 @@ class FeedListItemsParams < Knockapi::Internal::Type::BaseModel # @return [Array, nil] optional :workflow_categories, Knockapi::Internal::Type::ArrayOf[String] - # @!method initialize(after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {}) + # @!method initialize(after: nil, archived: nil, before: nil, exclude: nil, has_tenant: nil, inserted_at: nil, locale: nil, mode: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Knockapi::Models::Users::FeedListItemsParams} for more details. # @@ -87,10 +109,16 @@ class FeedListItemsParams < Knockapi::Internal::Type::BaseModel # # @param before [String] The cursor to fetch entries before. # + # @param exclude [String] Comma-separated list of field paths to exclude from the response. Use dot notati + # # @param has_tenant [Boolean] Whether the feed items have a tenant. # + # @param inserted_at [Knockapi::Models::Users::FeedListItemsParams::InsertedAt] + # # @param locale [String] The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `e # + # @param mode [Symbol, Knockapi::Models::Users::FeedListItemsParams::Mode] The mode to render the feed items in. Can be `compact` or `rich`. Defaults to `r + # # @param page_size [Integer] The number of items per page (defaults to 50). # # @param source [String] The workflow key associated with the message in the feed. @@ -117,6 +145,55 @@ module Archived # @return [Array] end + class InsertedAt < Knockapi::Internal::Type::BaseModel + # @!attribute gt + # Limits the results to items inserted after the given date. + # + # @return [String, nil] + optional :gt, String + + # @!attribute gte + # Limits the results to items inserted after or on the given date. + # + # @return [String, nil] + optional :gte, String + + # @!attribute lt + # Limits the results to items inserted before the given date. + # + # @return [String, nil] + optional :lt, String + + # @!attribute lte + # Limits the results to items inserted before or on the given date. + # + # @return [String, nil] + optional :lte, String + + # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil) + # @param gt [String] Limits the results to items inserted after the given date. + # + # @param gte [String] Limits the results to items inserted after or on the given date. + # + # @param lt [String] Limits the results to items inserted before the given date. + # + # @param lte [String] Limits the results to items inserted before or on the given date. + end + + # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + # `rich`. When `mode` is `compact`, feed items will not have `activities` and + # `total_activities` fields; the `data` field will not include nested arrays and + # objects; and the `actors` field will only have up to one actor. + module Mode + extend Knockapi::Internal::Type::Enum + + COMPACT = :compact + RICH = :rich + + # @!method self.values + # @return [Array] + end + # The status of the feed items. module Status extend Knockapi::Internal::Type::Enum diff --git a/lib/knockapi/resources/audiences.rb b/lib/knockapi/resources/audiences.rb index f3073cfe..f3d40769 100644 --- a/lib/knockapi/resources/audiences.rb +++ b/lib/knockapi/resources/audiences.rb @@ -9,7 +9,7 @@ class Audiences # # @param key [String] The key of the audience. # - # @param members [Array] A list of audience members to add. Limited to 1,000 members per request. + # @param members [Array] A list of audience members to add. You can add up to 1,000 members per request. # # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -47,13 +47,16 @@ def list_members(key, params = {}) ) end + # Some parameter documentations has been truncated, see + # {Knockapi::Models::AudienceRemoveMembersParams} for more details. + # # Removes one or more members from the specified audience. # # @overload remove_members(key, members:, request_options: {}) # # @param key [String] The key of the audience. # - # @param members [Array] A list of audience members to remove. + # @param members [Array] A list of audience members to remove. You can remove up to 1,000 members per req # # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/knockapi/resources/users/feeds.rb b/lib/knockapi/resources/users/feeds.rb index 28c8bdf5..558cd915 100644 --- a/lib/knockapi/resources/users/feeds.rb +++ b/lib/knockapi/resources/users/feeds.rb @@ -47,7 +47,7 @@ def get_settings(user_id, id, params = {}) # automatically excluded from both the `data` and `activities` fields of # `UserInAppFeedResponse`. # - # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {}) + # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, exclude: nil, has_tenant: nil, inserted_at: nil, locale: nil, mode: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {}) # # @param user_id [String] The unique identifier of the user. # @@ -59,10 +59,16 @@ def get_settings(user_id, id, params = {}) # # @param before [String] The cursor to fetch entries before. # + # @param exclude [String] Comma-separated list of field paths to exclude from the response. Use dot notati + # # @param has_tenant [Boolean] Whether the feed items have a tenant. # + # @param inserted_at [Knockapi::Models::Users::FeedListItemsParams::InsertedAt] + # # @param locale [String] The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `e # + # @param mode [Symbol, Knockapi::Models::Users::FeedListItemsParams::Mode] The mode to render the feed items in. Can be `compact` or `rich`. Defaults to `r + # # @param page_size [Integer] The number of items per page (defaults to 50). # # @param source [String] The workflow key associated with the message in the feed. diff --git a/lib/knockapi/version.rb b/lib/knockapi/version.rb index 38daf5e1..24e0f1c7 100644 --- a/lib/knockapi/version.rb +++ b/lib/knockapi/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Knockapi - VERSION = "1.30.0" + VERSION = "1.31.0" end diff --git a/rbi/knockapi/internal/util.rbi b/rbi/knockapi/internal/util.rbi index 920dadaa..315c06d5 100644 --- a/rbi/knockapi/internal/util.rbi +++ b/rbi/knockapi/internal/util.rbi @@ -296,7 +296,7 @@ module Knockapi end JSON_CONTENT = - T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp) + T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp) JSONL_CONTENT = T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp) diff --git a/rbi/knockapi/models/audience_add_members_params.rbi b/rbi/knockapi/models/audience_add_members_params.rbi index c89150cd..afccd806 100644 --- a/rbi/knockapi/models/audience_add_members_params.rbi +++ b/rbi/knockapi/models/audience_add_members_params.rbi @@ -11,7 +11,7 @@ module Knockapi T.any(Knockapi::AudienceAddMembersParams, Knockapi::Internal::AnyHash) end - # A list of audience members to add. Limited to 1,000 members per request. + # A list of audience members to add. You can add up to 1,000 members per request. sig { returns(T::Array[Knockapi::AudienceAddMembersParams::Member]) } attr_accessor :members @@ -22,7 +22,7 @@ module Knockapi ).returns(T.attached_class) end def self.new( - # A list of audience members to add. Limited to 1,000 members per request. + # A list of audience members to add. You can add up to 1,000 members per request. members:, request_options: {} ) diff --git a/rbi/knockapi/models/audience_remove_members_params.rbi b/rbi/knockapi/models/audience_remove_members_params.rbi index 8c89bb43..82383ba7 100644 --- a/rbi/knockapi/models/audience_remove_members_params.rbi +++ b/rbi/knockapi/models/audience_remove_members_params.rbi @@ -14,7 +14,8 @@ module Knockapi ) end - # A list of audience members to remove. + # A list of audience members to remove. You can remove up to 1,000 members per + # request. sig { returns(T::Array[Knockapi::AudienceRemoveMembersParams::Member]) } attr_accessor :members @@ -26,7 +27,8 @@ module Knockapi ).returns(T.attached_class) end def self.new( - # A list of audience members to remove. + # A list of audience members to remove. You can remove up to 1,000 members per + # request. members:, request_options: {} ) diff --git a/rbi/knockapi/models/message_list_params.rbi b/rbi/knockapi/models/message_list_params.rbi index 04f5ace4..607bb233 100644 --- a/rbi/knockapi/models/message_list_params.rbi +++ b/rbi/knockapi/models/message_list_params.rbi @@ -286,28 +286,28 @@ module Knockapi ) end - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. sig { returns(T.nilable(String)) } attr_reader :gt sig { params(gt: String).void } attr_writer :gt - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. sig { returns(T.nilable(String)) } attr_reader :gte sig { params(gte: String).void } attr_writer :gte - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. sig { returns(T.nilable(String)) } attr_reader :lt sig { params(lt: String).void } attr_writer :lt - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. sig { returns(T.nilable(String)) } attr_reader :lte @@ -320,13 +320,13 @@ module Knockapi ) end def self.new( - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. gt: nil, - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. gte: nil, - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. lt: nil, - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. lte: nil ) end diff --git a/rbi/knockapi/models/object_list_messages_params.rbi b/rbi/knockapi/models/object_list_messages_params.rbi index 582957e3..98b5b7fd 100644 --- a/rbi/knockapi/models/object_list_messages_params.rbi +++ b/rbi/knockapi/models/object_list_messages_params.rbi @@ -298,28 +298,28 @@ module Knockapi ) end - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. sig { returns(T.nilable(String)) } attr_reader :gt sig { params(gt: String).void } attr_writer :gt - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. sig { returns(T.nilable(String)) } attr_reader :gte sig { params(gte: String).void } attr_writer :gte - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. sig { returns(T.nilable(String)) } attr_reader :lt sig { params(lt: String).void } attr_writer :lt - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. sig { returns(T.nilable(String)) } attr_reader :lte @@ -332,13 +332,13 @@ module Knockapi ) end def self.new( - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. gt: nil, - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. gte: nil, - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. lt: nil, - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. lte: nil ) end diff --git a/rbi/knockapi/models/user_list_messages_params.rbi b/rbi/knockapi/models/user_list_messages_params.rbi index 4c9b0606..9fc8114e 100644 --- a/rbi/knockapi/models/user_list_messages_params.rbi +++ b/rbi/knockapi/models/user_list_messages_params.rbi @@ -297,28 +297,28 @@ module Knockapi ) end - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. sig { returns(T.nilable(String)) } attr_reader :gt sig { params(gt: String).void } attr_writer :gt - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. sig { returns(T.nilable(String)) } attr_reader :gte sig { params(gte: String).void } attr_writer :gte - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. sig { returns(T.nilable(String)) } attr_reader :lt sig { params(lt: String).void } attr_writer :lt - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. sig { returns(T.nilable(String)) } attr_reader :lte @@ -331,13 +331,13 @@ module Knockapi ) end def self.new( - # Limits the results to messages inserted after the given date. + # Limits the results to items inserted after the given date. gt: nil, - # Limits the results to messages inserted after or on the given date. + # Limits the results to items inserted after or on the given date. gte: nil, - # Limits the results to messages inserted before the given date. + # Limits the results to items inserted before the given date. lt: nil, - # Limits the results to messages inserted before or on the given date. + # Limits the results to items inserted before or on the given date. lte: nil ) end diff --git a/rbi/knockapi/models/users/feed_list_items_params.rbi b/rbi/knockapi/models/users/feed_list_items_params.rbi index 5d447fdf..96f2be50 100644 --- a/rbi/knockapi/models/users/feed_list_items_params.rbi +++ b/rbi/knockapi/models/users/feed_list_items_params.rbi @@ -44,6 +44,15 @@ module Knockapi sig { params(before: String).void } attr_writer :before + # Comma-separated list of field paths to exclude from the response. Use dot + # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels + # deep. + sig { returns(T.nilable(String)) } + attr_reader :exclude + + sig { params(exclude: String).void } + attr_writer :exclude + # Whether the feed items have a tenant. sig { returns(T.nilable(T::Boolean)) } attr_reader :has_tenant @@ -51,6 +60,19 @@ module Knockapi sig { params(has_tenant: T::Boolean).void } attr_writer :has_tenant + sig do + returns(T.nilable(Knockapi::Users::FeedListItemsParams::InsertedAt)) + end + attr_reader :inserted_at + + sig do + params( + inserted_at: + Knockapi::Users::FeedListItemsParams::InsertedAt::OrHash + ).void + end + attr_writer :inserted_at + # The locale to render the feed items in. Must be in the IETF 5646 format (e.g. # `en-US`). When not provided, will default to the locale that the feed items were # rendered in. Only available for enterprise plan customers using custom @@ -61,6 +83,24 @@ module Knockapi sig { params(locale: String).void } attr_writer :locale + # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + # `rich`. When `mode` is `compact`, feed items will not have `activities` and + # `total_activities` fields; the `data` field will not include nested arrays and + # objects; and the `actors` field will only have up to one actor. + sig do + returns( + T.nilable(Knockapi::Users::FeedListItemsParams::Mode::OrSymbol) + ) + end + attr_reader :mode + + sig do + params( + mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol + ).void + end + attr_writer :mode + # The number of items per page (defaults to 50). sig { returns(T.nilable(Integer)) } attr_reader :page_size @@ -116,8 +156,12 @@ module Knockapi after: String, archived: Knockapi::Users::FeedListItemsParams::Archived::OrSymbol, before: String, + exclude: String, has_tenant: T::Boolean, + inserted_at: + Knockapi::Users::FeedListItemsParams::InsertedAt::OrHash, locale: String, + mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol, page_size: Integer, source: String, status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol, @@ -134,13 +178,23 @@ module Knockapi archived: nil, # The cursor to fetch entries before. before: nil, + # Comma-separated list of field paths to exclude from the response. Use dot + # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels + # deep. + exclude: nil, # Whether the feed items have a tenant. has_tenant: nil, + inserted_at: nil, # The locale to render the feed items in. Must be in the IETF 5646 format (e.g. # `en-US`). When not provided, will default to the locale that the feed items were # rendered in. Only available for enterprise plan customers using custom # translations. locale: nil, + # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + # `rich`. When `mode` is `compact`, feed items will not have `activities` and + # `total_activities` fields; the `data` field will not include nested arrays and + # objects; and the `actors` field will only have up to one actor. + mode: nil, # The number of items per page (defaults to 50). page_size: nil, # The workflow key associated with the message in the feed. @@ -164,8 +218,11 @@ module Knockapi archived: Knockapi::Users::FeedListItemsParams::Archived::OrSymbol, before: String, + exclude: String, has_tenant: T::Boolean, + inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt, locale: String, + mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol, page_size: Integer, source: String, status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol, @@ -216,6 +273,102 @@ module Knockapi end end + class InsertedAt < Knockapi::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Knockapi::Users::FeedListItemsParams::InsertedAt, + Knockapi::Internal::AnyHash + ) + end + + # Limits the results to items inserted after the given date. + sig { returns(T.nilable(String)) } + attr_reader :gt + + sig { params(gt: String).void } + attr_writer :gt + + # Limits the results to items inserted after or on the given date. + sig { returns(T.nilable(String)) } + attr_reader :gte + + sig { params(gte: String).void } + attr_writer :gte + + # Limits the results to items inserted before the given date. + sig { returns(T.nilable(String)) } + attr_reader :lt + + sig { params(lt: String).void } + attr_writer :lt + + # Limits the results to items inserted before or on the given date. + sig { returns(T.nilable(String)) } + attr_reader :lte + + sig { params(lte: String).void } + attr_writer :lte + + sig do + params(gt: String, gte: String, lt: String, lte: String).returns( + T.attached_class + ) + end + def self.new( + # Limits the results to items inserted after the given date. + gt: nil, + # Limits the results to items inserted after or on the given date. + gte: nil, + # Limits the results to items inserted before the given date. + lt: nil, + # Limits the results to items inserted before or on the given date. + lte: nil + ) + end + + sig do + override.returns( + { gt: String, gte: String, lt: String, lte: String } + ) + end + def to_hash + end + end + + # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + # `rich`. When `mode` is `compact`, feed items will not have `activities` and + # `total_activities` fields; the `data` field will not include nested arrays and + # objects; and the `actors` field will only have up to one actor. + module Mode + extend Knockapi::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Knockapi::Users::FeedListItemsParams::Mode) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + COMPACT = + T.let( + :compact, + Knockapi::Users::FeedListItemsParams::Mode::TaggedSymbol + ) + RICH = + T.let( + :rich, + Knockapi::Users::FeedListItemsParams::Mode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Knockapi::Users::FeedListItemsParams::Mode::TaggedSymbol] + ) + end + def self.values + end + end + # The status of the feed items. module Status extend Knockapi::Internal::Type::Enum diff --git a/rbi/knockapi/resources/audiences.rbi b/rbi/knockapi/resources/audiences.rbi index 6cb0537a..0d6fbcef 100644 --- a/rbi/knockapi/resources/audiences.rbi +++ b/rbi/knockapi/resources/audiences.rbi @@ -14,7 +14,7 @@ module Knockapi def add_members( # The key of the audience. key, - # A list of audience members to add. Limited to 1,000 members per request. + # A list of audience members to add. You can add up to 1,000 members per request. members:, request_options: {} ) @@ -46,7 +46,8 @@ module Knockapi def remove_members( # The key of the audience. key, - # A list of audience members to remove. + # A list of audience members to remove. You can remove up to 1,000 members per + # request. members:, request_options: {} ) diff --git a/rbi/knockapi/resources/users/feeds.rbi b/rbi/knockapi/resources/users/feeds.rbi index dd9633eb..c6c7c0ad 100644 --- a/rbi/knockapi/resources/users/feeds.rbi +++ b/rbi/knockapi/resources/users/feeds.rbi @@ -45,8 +45,12 @@ module Knockapi after: String, archived: Knockapi::Users::FeedListItemsParams::Archived::OrSymbol, before: String, + exclude: String, has_tenant: T::Boolean, + inserted_at: + Knockapi::Users::FeedListItemsParams::InsertedAt::OrHash, locale: String, + mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol, page_size: Integer, source: String, status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol, @@ -71,13 +75,23 @@ module Knockapi archived: nil, # The cursor to fetch entries before. before: nil, + # Comma-separated list of field paths to exclude from the response. Use dot + # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels + # deep. + exclude: nil, # Whether the feed items have a tenant. has_tenant: nil, + inserted_at: nil, # The locale to render the feed items in. Must be in the IETF 5646 format (e.g. # `en-US`). When not provided, will default to the locale that the feed items were # rendered in. Only available for enterprise plan customers using custom # translations. locale: nil, + # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to + # `rich`. When `mode` is `compact`, feed items will not have `activities` and + # `total_activities` fields; the `data` field will not include nested arrays and + # objects; and the `actors` field will only have up to one actor. + mode: nil, # The number of items per page (defaults to 50). page_size: nil, # The workflow key associated with the message in the feed. diff --git a/sig/knockapi/models/users/feed_list_items_params.rbs b/sig/knockapi/models/users/feed_list_items_params.rbs index 98ef8163..b897eb17 100644 --- a/sig/knockapi/models/users/feed_list_items_params.rbs +++ b/sig/knockapi/models/users/feed_list_items_params.rbs @@ -6,8 +6,11 @@ module Knockapi after: String, archived: Knockapi::Models::Users::FeedListItemsParams::archived, before: String, + exclude: String, has_tenant: bool, + inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt, locale: String, + mode: Knockapi::Models::Users::FeedListItemsParams::mode, page_size: Integer, source: String, status: Knockapi::Models::Users::FeedListItemsParams::status, @@ -35,14 +38,30 @@ module Knockapi def before=: (String) -> String + attr_reader exclude: String? + + def exclude=: (String) -> String + attr_reader has_tenant: bool? def has_tenant=: (bool) -> bool + attr_reader inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt? + + def inserted_at=: ( + Knockapi::Users::FeedListItemsParams::InsertedAt + ) -> Knockapi::Users::FeedListItemsParams::InsertedAt + attr_reader locale: String? def locale=: (String) -> String + attr_reader mode: Knockapi::Models::Users::FeedListItemsParams::mode? + + def mode=: ( + Knockapi::Models::Users::FeedListItemsParams::mode + ) -> Knockapi::Models::Users::FeedListItemsParams::mode + attr_reader page_size: Integer? def page_size=: (Integer) -> Integer @@ -73,8 +92,11 @@ module Knockapi ?after: String, ?archived: Knockapi::Models::Users::FeedListItemsParams::archived, ?before: String, + ?exclude: String, ?has_tenant: bool, + ?inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt, ?locale: String, + ?mode: Knockapi::Models::Users::FeedListItemsParams::mode, ?page_size: Integer, ?source: String, ?status: Knockapi::Models::Users::FeedListItemsParams::status, @@ -88,8 +110,11 @@ module Knockapi after: String, archived: Knockapi::Models::Users::FeedListItemsParams::archived, before: String, + exclude: String, has_tenant: bool, + inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt, locale: String, + mode: Knockapi::Models::Users::FeedListItemsParams::mode, page_size: Integer, source: String, status: Knockapi::Models::Users::FeedListItemsParams::status, @@ -111,6 +136,46 @@ module Knockapi def self?.values: -> ::Array[Knockapi::Models::Users::FeedListItemsParams::archived] end + type inserted_at = { gt: String, gte: String, lt: String, lte: String } + + class InsertedAt < Knockapi::Internal::Type::BaseModel + attr_reader gt: String? + + def gt=: (String) -> String + + attr_reader gte: String? + + def gte=: (String) -> String + + attr_reader lt: String? + + def lt=: (String) -> String + + attr_reader lte: String? + + def lte=: (String) -> String + + def initialize: ( + ?gt: String, + ?gte: String, + ?lt: String, + ?lte: String + ) -> void + + def to_hash: -> { gt: String, gte: String, lt: String, lte: String } + end + + type mode = :compact | :rich + + module Mode + extend Knockapi::Internal::Type::Enum + + COMPACT: :compact + RICH: :rich + + def self?.values: -> ::Array[Knockapi::Models::Users::FeedListItemsParams::mode] + end + type status = :unread | :read | :unseen | :seen | :all module Status diff --git a/sig/knockapi/resources/users/feeds.rbs b/sig/knockapi/resources/users/feeds.rbs index c43a0b66..7790da37 100644 --- a/sig/knockapi/resources/users/feeds.rbs +++ b/sig/knockapi/resources/users/feeds.rbs @@ -14,8 +14,11 @@ module Knockapi ?after: String, ?archived: Knockapi::Models::Users::FeedListItemsParams::archived, ?before: String, + ?exclude: String, ?has_tenant: bool, + ?inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt, ?locale: String, + ?mode: Knockapi::Models::Users::FeedListItemsParams::mode, ?page_size: Integer, ?source: String, ?status: Knockapi::Models::Users::FeedListItemsParams::status, diff --git a/test/knockapi/internal/util_test.rb b/test/knockapi/internal/util_test.rb index 313267b1..8653ab38 100644 --- a/test/knockapi/internal/util_test.rb +++ b/test/knockapi/internal/util_test.rb @@ -171,6 +171,8 @@ def test_json_content cases = { "application/json" => true, "application/jsonl" => false, + "application/arbitrary+json" => true, + "application/ARBITRARY+json" => true, "application/vnd.github.v3+json" => true, "application/vnd.api+json" => true } diff --git a/test/knockapi/resources/audiences_test.rb b/test/knockapi/resources/audiences_test.rb index 587b78bb..b19ec078 100644 --- a/test/knockapi/resources/audiences_test.rb +++ b/test/knockapi/resources/audiences_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::AudiencesTest < Knockapi::Test::ResourceTest def test_add_members_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.audiences.add_members("key", members: [{user: {id: "dr_sattler"}}]) @@ -14,7 +14,7 @@ def test_add_members_required_params end def test_list_members - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.audiences.list_members("key") @@ -31,7 +31,7 @@ def test_list_members end def test_remove_members_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.audiences.remove_members("key", members: [{user: {id: "dr_sattler"}}]) diff --git a/test/knockapi/resources/bulk_operations_test.rb b/test/knockapi/resources/bulk_operations_test.rb index a3f809c0..befdeaad 100644 --- a/test/knockapi/resources/bulk_operations_test.rb +++ b/test/knockapi/resources/bulk_operations_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::BulkOperationsTest < Knockapi::Test::ResourceTest def test_get - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.bulk_operations.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/test/knockapi/resources/channels/bulk_test.rb b/test/knockapi/resources/channels/bulk_test.rb index ffba753b..7a024632 100644 --- a/test/knockapi/resources/channels/bulk_test.rb +++ b/test/knockapi/resources/channels/bulk_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Channels::BulkTest < Knockapi::Test::ResourceTest def test_update_message_status - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.channels.bulk.update_message_status("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", :seen) diff --git a/test/knockapi/resources/integrations/census_test.rb b/test/knockapi/resources/integrations/census_test.rb index fa783f60..0e8cfce8 100644 --- a/test/knockapi/resources/integrations/census_test.rb +++ b/test/knockapi/resources/integrations/census_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Integrations::CensusTest < Knockapi::Test::ResourceTest def test_custom_destination_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.integrations.census.custom_destination(id: "id", jsonrpc: "jsonrpc", method_: "method") diff --git a/test/knockapi/resources/integrations/hightouch_test.rb b/test/knockapi/resources/integrations/hightouch_test.rb index 3f89d001..414b37e0 100644 --- a/test/knockapi/resources/integrations/hightouch_test.rb +++ b/test/knockapi/resources/integrations/hightouch_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Integrations::HightouchTest < Knockapi::Test::ResourceTest def test_embedded_destination_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.integrations.hightouch.embedded_destination(id: "id", jsonrpc: "jsonrpc", method_: "method") diff --git a/test/knockapi/resources/messages/batch_test.rb b/test/knockapi/resources/messages/batch_test.rb index 8fc458fb..83d3fb0f 100644 --- a/test/knockapi/resources/messages/batch_test.rb +++ b/test/knockapi/resources/messages/batch_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Messages::BatchTest < Knockapi::Test::ResourceTest def test_archive_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.archive( @@ -20,7 +20,7 @@ def test_archive_required_params end def test_get_content_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.get_content(message_ids: ["string"]) @@ -30,7 +30,7 @@ def test_get_content_required_params end def test_mark_as_interacted_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.mark_as_interacted(message_ids: ["1jNaXzB2RZX3LY8wVQnfCKyPnv7"]) @@ -40,7 +40,7 @@ def test_mark_as_interacted_required_params end def test_mark_as_read_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.mark_as_read( @@ -53,7 +53,7 @@ def test_mark_as_read_required_params end def test_mark_as_seen_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.mark_as_seen( @@ -66,7 +66,7 @@ def test_mark_as_seen_required_params end def test_mark_as_unread_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.mark_as_unread( @@ -79,7 +79,7 @@ def test_mark_as_unread_required_params end def test_mark_as_unseen_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.mark_as_unseen( @@ -92,7 +92,7 @@ def test_mark_as_unseen_required_params end def test_unarchive_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.batch.unarchive( diff --git a/test/knockapi/resources/messages_test.rb b/test/knockapi/resources/messages_test.rb index 8401225e..b6d59419 100644 --- a/test/knockapi/resources/messages_test.rb +++ b/test/knockapi/resources/messages_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::MessagesTest < Knockapi::Test::ResourceTest def test_list - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.list @@ -48,7 +48,7 @@ def test_list end def test_archive - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.archive("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -85,7 +85,7 @@ def test_archive end def test_get - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.get("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -122,7 +122,7 @@ def test_get end def test_get_content - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.get_content("message_id") @@ -141,7 +141,7 @@ def test_get_content end def test_list_activities - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.list_activities("message_id") @@ -170,7 +170,7 @@ def test_list_activities end def test_list_delivery_logs - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.list_delivery_logs("message_id") @@ -199,7 +199,7 @@ def test_list_delivery_logs end def test_list_events - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.list_events("message_id") @@ -227,7 +227,7 @@ def test_list_events end def test_mark_as_interacted - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.mark_as_interacted("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -264,7 +264,7 @@ def test_mark_as_interacted end def test_mark_as_read - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.mark_as_read("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -301,7 +301,7 @@ def test_mark_as_read end def test_mark_as_seen - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.mark_as_seen("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -338,7 +338,7 @@ def test_mark_as_seen end def test_mark_as_unread - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.mark_as_unread("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -375,7 +375,7 @@ def test_mark_as_unread end def test_mark_as_unseen - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.mark_as_unseen("1jNaXzB2RZX3LY8wVQnfCKyPnv7") @@ -412,7 +412,7 @@ def test_mark_as_unseen end def test_unarchive - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.messages.unarchive("1jNaXzB2RZX3LY8wVQnfCKyPnv7") diff --git a/test/knockapi/resources/objects/bulk_test.rb b/test/knockapi/resources/objects/bulk_test.rb index 49ab838c..7779bda6 100644 --- a/test/knockapi/resources/objects/bulk_test.rb +++ b/test/knockapi/resources/objects/bulk_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Objects::BulkTest < Knockapi::Test::ResourceTest def test_delete_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.bulk.delete("collection", object_ids: %w[obj_123 obj_456 obj_789]) @@ -34,7 +34,7 @@ def test_delete_required_params end def test_add_subscriptions_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.bulk.add_subscriptions( @@ -68,7 +68,7 @@ def test_add_subscriptions_required_params end def test_delete_subscriptions_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.bulk.delete_subscriptions( @@ -105,7 +105,7 @@ def test_delete_subscriptions_required_params end def test_set_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.bulk.set("collection", objects: [{id: "project_1"}]) diff --git a/test/knockapi/resources/objects_test.rb b/test/knockapi/resources/objects_test.rb index d3edf139..3407120a 100644 --- a/test/knockapi/resources/objects_test.rb +++ b/test/knockapi/resources/objects_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::ObjectsTest < Knockapi::Test::ResourceTest def test_list - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.list("collection") @@ -32,7 +32,7 @@ def test_list end def test_delete - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.delete("collection", "id") @@ -42,7 +42,7 @@ def test_delete end def test_add_subscriptions_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.add_subscriptions("collection", "object_id", recipients: %w[user_1 user_2]) @@ -52,7 +52,7 @@ def test_add_subscriptions_required_params end def test_delete_subscriptions_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.delete_subscriptions("collection", "object_id", recipients: ["user_123"]) @@ -62,7 +62,7 @@ def test_delete_subscriptions_required_params end def test_get - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.get("collection", "id") @@ -83,7 +83,7 @@ def test_get end def test_get_channel_data - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.get_channel_data("collection", "object_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -103,7 +103,7 @@ def test_get_channel_data end def test_get_preferences - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.get_preferences("collection", "object_id", "default") @@ -124,7 +124,7 @@ def test_get_preferences end def test_list_messages - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.list_messages("projects", "project-123") @@ -168,7 +168,7 @@ def test_list_messages end def test_list_preferences - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.list_preferences("collection", "object_id") @@ -178,7 +178,7 @@ def test_list_preferences end def test_list_schedules - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.list_schedules("collection", "id") @@ -212,7 +212,7 @@ def test_list_schedules end def test_list_subscriptions - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.list_subscriptions("collection", "object_id") @@ -240,7 +240,7 @@ def test_list_subscriptions end def test_set - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.set("collection", "id") @@ -261,7 +261,7 @@ def test_set end def test_set_channel_data_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.set_channel_data( @@ -286,7 +286,7 @@ def test_set_channel_data_required_params end def test_set_preferences - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.set_preferences("collection", "object_id", "default") @@ -307,7 +307,7 @@ def test_set_preferences end def test_unset_channel_data - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.objects.unset_channel_data("collection", "object_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/test/knockapi/resources/providers/ms_teams_test.rb b/test/knockapi/resources/providers/ms_teams_test.rb index b53a67b8..b931f959 100644 --- a/test/knockapi/resources/providers/ms_teams_test.rb +++ b/test/knockapi/resources/providers/ms_teams_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Providers::MsTeamsTest < Knockapi::Test::ResourceTest def test_check_auth_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.ms_teams.check_auth("channel_id", ms_teams_tenant_object: "ms_teams_tenant_object") @@ -21,7 +21,7 @@ def test_check_auth_required_params end def test_list_channels_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.ms_teams.list_channels( @@ -42,7 +42,7 @@ def test_list_channels_required_params end def test_list_teams_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.ms_teams.list_teams("channel_id", ms_teams_tenant_object: "ms_teams_tenant_object") @@ -68,7 +68,7 @@ def test_list_teams_required_params end def test_revoke_access_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.ms_teams.revoke_access("channel_id", ms_teams_tenant_object: "ms_teams_tenant_object") diff --git a/test/knockapi/resources/providers/slack_test.rb b/test/knockapi/resources/providers/slack_test.rb index e26b3837..2205c6f3 100644 --- a/test/knockapi/resources/providers/slack_test.rb +++ b/test/knockapi/resources/providers/slack_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Providers::SlackTest < Knockapi::Test::ResourceTest def test_check_auth_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.slack.check_auth("channel_id", access_token_object: "access_token_object") @@ -20,7 +20,7 @@ def test_check_auth_required_params end def test_list_channels_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.slack.list_channels("channel_id", access_token_object: "access_token_object") @@ -47,7 +47,7 @@ def test_list_channels_required_params end def test_revoke_access_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.providers.slack.revoke_access("channel_id", access_token_object: "access_token_object") diff --git a/test/knockapi/resources/schedules/bulk_test.rb b/test/knockapi/resources/schedules/bulk_test.rb index dadf4efd..4cbd6f77 100644 --- a/test/knockapi/resources/schedules/bulk_test.rb +++ b/test/knockapi/resources/schedules/bulk_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Schedules::BulkTest < Knockapi::Test::ResourceTest def test_create_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.schedules.bulk.create(schedules: [{workflow: "comment-created"}, {workflow: "comment-created"}]) diff --git a/test/knockapi/resources/schedules_test.rb b/test/knockapi/resources/schedules_test.rb index 379acca8..4d83736c 100644 --- a/test/knockapi/resources/schedules_test.rb +++ b/test/knockapi/resources/schedules_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::SchedulesTest < Knockapi::Test::ResourceTest def test_create_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.schedules.create(recipients: ["user_123"], workflow: "comment-created") @@ -14,7 +14,7 @@ def test_create_required_params end def test_update_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.schedules.update(schedule_ids: ["123e4567-e89b-12d3-a456-426614174000"]) @@ -24,7 +24,7 @@ def test_update_required_params end def test_list_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.schedules.list(workflow: "workflow") @@ -58,7 +58,7 @@ def test_list_required_params end def test_delete_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.schedules.delete(schedule_ids: ["123e4567-e89b-12d3-a456-426614174000"]) diff --git a/test/knockapi/resources/tenants/bulk_test.rb b/test/knockapi/resources/tenants/bulk_test.rb index d2afd40e..903a4ad9 100644 --- a/test/knockapi/resources/tenants/bulk_test.rb +++ b/test/knockapi/resources/tenants/bulk_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Tenants::BulkTest < Knockapi::Test::ResourceTest def test_delete_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.tenants.bulk.delete(tenant_ids: ["string"]) @@ -34,7 +34,7 @@ def test_delete_required_params end def test_set_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.tenants.bulk.set(tenants: [{id: "tenant_1"}]) diff --git a/test/knockapi/resources/tenants_test.rb b/test/knockapi/resources/tenants_test.rb index 1f12ecc3..200ce67e 100644 --- a/test/knockapi/resources/tenants_test.rb +++ b/test/knockapi/resources/tenants_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::TenantsTest < Knockapi::Test::ResourceTest def test_list - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.tenants.list @@ -30,7 +30,7 @@ def test_list end def test_delete - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.tenants.delete("id") @@ -40,7 +40,7 @@ def test_delete end def test_get - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.tenants.get("id") @@ -59,7 +59,7 @@ def test_get end def test_set - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.tenants.set("id") diff --git a/test/knockapi/resources/users/bulk_test.rb b/test/knockapi/resources/users/bulk_test.rb index 813a175f..8fd47835 100644 --- a/test/knockapi/resources/users/bulk_test.rb +++ b/test/knockapi/resources/users/bulk_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Users::BulkTest < Knockapi::Test::ResourceTest def test_delete_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.bulk.delete(user_ids: %w[user_1 user_2]) @@ -34,7 +34,7 @@ def test_delete_required_params end def test_identify_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.bulk.identify(users: [{id: "user_1"}]) @@ -64,7 +64,7 @@ def test_identify_required_params end def test_set_preferences_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.bulk.set_preferences(preferences: {}, user_ids: %w[user_1 user_2]) diff --git a/test/knockapi/resources/users/feeds_test.rb b/test/knockapi/resources/users/feeds_test.rb index 73200b87..5f900b0e 100644 --- a/test/knockapi/resources/users/feeds_test.rb +++ b/test/knockapi/resources/users/feeds_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Users::FeedsTest < Knockapi::Test::ResourceTest def test_get_settings - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.feeds.get_settings("user_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -20,7 +20,7 @@ def test_get_settings end def test_list_items - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.feeds.list_items("user_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/test/knockapi/resources/users/guides_test.rb b/test/knockapi/resources/users/guides_test.rb index acb2d853..80077421 100644 --- a/test/knockapi/resources/users/guides_test.rb +++ b/test/knockapi/resources/users/guides_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::Users::GuidesTest < Knockapi::Test::ResourceTest def test_get_channel - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.guides.get_channel("user_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -23,7 +23,7 @@ def test_get_channel end def test_mark_message_as_archived_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.guides.mark_message_as_archived( @@ -47,7 +47,7 @@ def test_mark_message_as_archived_required_params end def test_mark_message_as_interacted_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.guides.mark_message_as_interacted( @@ -71,7 +71,7 @@ def test_mark_message_as_interacted_required_params end def test_mark_message_as_seen_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.guides.mark_message_as_seen( diff --git a/test/knockapi/resources/users_test.rb b/test/knockapi/resources/users_test.rb index 3f4b7291..e22f5066 100644 --- a/test/knockapi/resources/users_test.rb +++ b/test/knockapi/resources/users_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::UsersTest < Knockapi::Test::ResourceTest def test_update - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.update("user_id") @@ -28,7 +28,7 @@ def test_update end def test_list - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.list @@ -59,7 +59,7 @@ def test_list end def test_delete - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.delete("user_id") @@ -69,7 +69,7 @@ def test_delete end def test_get - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.get("user_id") @@ -93,7 +93,7 @@ def test_get end def test_get_channel_data - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.get_channel_data("user_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -112,7 +112,7 @@ def test_get_channel_data end def test_get_preferences - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.get_preferences("user_id", "default") @@ -133,7 +133,7 @@ def test_get_preferences end def test_list_messages - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.list_messages("user-123") @@ -177,7 +177,7 @@ def test_list_messages end def test_list_preferences - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.list_preferences("user_id") @@ -187,7 +187,7 @@ def test_list_preferences end def test_list_schedules - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.list_schedules("user_id") @@ -221,7 +221,7 @@ def test_list_schedules end def test_list_subscriptions - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.list_subscriptions("user_id") @@ -249,7 +249,7 @@ def test_list_subscriptions end def test_merge_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.merge("user_id", from_user_id: "user_1") @@ -273,7 +273,7 @@ def test_merge_required_params end def test_set_channel_data_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.set_channel_data( @@ -297,7 +297,7 @@ def test_set_channel_data_required_params end def test_set_preferences - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.set_preferences("user_id", "default") @@ -318,7 +318,7 @@ def test_set_preferences end def test_unset_channel_data - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.users.unset_channel_data("user_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/test/knockapi/resources/workflows_test.rb b/test/knockapi/resources/workflows_test.rb index 5e849482..01a67ead 100644 --- a/test/knockapi/resources/workflows_test.rb +++ b/test/knockapi/resources/workflows_test.rb @@ -4,7 +4,7 @@ class Knockapi::Test::Resources::WorkflowsTest < Knockapi::Test::ResourceTest def test_cancel_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.workflows.cancel("key", cancellation_key: "cancel-workflow-123") @@ -14,7 +14,7 @@ def test_cancel_required_params end def test_trigger_required_params - skip("Prism doesn't support callbacks yet") + skip("Mock server doesn't support callbacks yet") response = @knock.workflows.trigger("key", recipients: %w[dr_grant dr_sattler dr_malcolm])