stigg-api-client 6.2.3 → 6.5.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: 933f4b42596d7411c39852867081b43e4aa49c5d85866f26d19e415948429b74
4
- data.tar.gz: 2508568b349e04d7d7e66e52770e353921d095cbcb82a6d5082b638a25bb565f
3
+ metadata.gz: 2f5df408ae91ba1c51abfe7a6b018b2af9633e6384e50021395c919da8de1bdf
4
+ data.tar.gz: c4ace4589f32533784a06bd05154692c21c4b2fbb19f8709a143d7850a46d5d7
5
5
  SHA512:
6
- metadata.gz: d94af04bc8d4a73599cffa7c9a256dd976dc61dafe74d2226a79d94b864127ea3bca08b2e577fd528a56d1ac7e152bea7a688e86c25b4015a0e35e1e90bf9f4f
7
- data.tar.gz: 2c98ef66800cb46ccbb417cc38a2f201b819d4538ec1eb50435770cf82964aa38565d50cd90b526339f3d606f790f597f974c4273b10d79e7009435da8a2647f
6
+ metadata.gz: 4d4f58895c25ff9ffda6f313c56b833e1953bb0398769706aee6f2265975dc21487ea8298891c5d8491cbde634f63f818f83d19828c70c16bb3240818634b1fa
7
+ data.tar.gz: 5bdc5a5f30097970e7d137bcc0c5a5612bef6ab9bf42cd734393e50e030656c15e468e28ba679ec95a85c8699561bbaaaed077e4fdf75ba7d87ed47a110efe44
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 3
3
+ NewCops: enable
4
+ SuggestExtensions: false
3
5
 
4
6
  Style/StringLiterals:
5
7
  Enabled: true
@@ -20,3 +22,12 @@ Metrics/ModuleLength:
20
22
 
21
23
  Style/MutableConstant:
22
24
  Enabled: false
25
+
26
+ Style/Documentation:
27
+ Enabled: false
28
+
29
+ Metrics/MethodLength:
30
+ Max: 15
31
+
32
+ Gemspec/RequireMFA:
33
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stigg-api-client (6.2.3)
4
+ stigg-api-client (6.5.0)
5
5
  graphlient (>= 0.6.0, < 1.0)
6
6
  graphql-client (>= 0.19, < 1.0)
7
7
 
data/lib/stigg/client.rb CHANGED
@@ -4,11 +4,11 @@ require_relative "version"
4
4
  require "graphlient"
5
5
 
6
6
  module Stigg
7
- OperationsNames = Hash.new
7
+ OperationsNames = {}
8
8
  class StiggHTTPAdapter < Graphlient::Adapters::HTTP::FaradayAdapter
9
9
  def execute(document:, operation_name:, variables:, context:)
10
10
  headers = context[:headers] || {}
11
- headers.merge!({'x-graphql-operations-name': Stigg::OperationsNames[operation_name]})
11
+ headers.merge!({ "x-graphql-operations-name": Stigg::OperationsNames[operation_name] })
12
12
  context[:headers] = headers
13
13
 
14
14
  super
@@ -21,7 +21,7 @@ module Stigg
21
21
  end
22
22
 
23
23
  def request(query, variables = nil)
24
- operation_name_regex = /^(?:mutation|query) ([a-zA-Z0-9_\-]+)/
24
+ operation_name_regex = /^(?:mutation|query) ([a-zA-Z0-9_-]+)/
25
25
  operation_name, = query.match(operation_name_regex).captures
26
26
 
27
27
  query = query.sub(operation_name, "")
@@ -37,8 +37,8 @@ module Stigg
37
37
  # @param [String] api_key
38
38
  # @param [String api_url
39
39
  # @return [Client]
40
- def create_client(api_key, api_url = "https://api.stigg.io/graphql", request_timeout=30)
41
- schema_path = File.join(__dir__, 'generated/schema.json').to_s
40
+ def create_client(api_key, api_url = "https://api.stigg.io/graphql", request_timeout = 30)
41
+ schema_path = File.join(__dir__, "generated/schema.json").to_s
42
42
 
43
43
  client = Graphlient::Client.new(
44
44
  api_url,
@@ -72,6 +72,14 @@ module Stigg
72
72
  description
73
73
  }
74
74
  blockSize
75
+ topUpCustomCurrencyId
76
+ customCurrency {
77
+ displayName
78
+ units {
79
+ singular
80
+ plural
81
+ }
82
+ }
75
83
  }
76
84
  GRAPHQL
77
85
 
@@ -181,6 +189,14 @@ module Stigg
181
189
  isCustom
182
190
  isGranted
183
191
  order
192
+ dependencyFeature {
193
+ refId
194
+ displayName
195
+ description
196
+ featureType
197
+ featureUnits
198
+ featureUnitsPlural
199
+ }
184
200
  customCurrency {
185
201
  currencyId
186
202
  displayName
@@ -1583,6 +1599,7 @@ module Stigg
1583
1599
  fragment MockPaywallPriceFragment on PaywallPrice {
1584
1600
  billingModel
1585
1601
  billingPeriod
1602
+ billingCadence
1586
1603
  billingId
1587
1604
  minUnitQuantity
1588
1605
  maxUnitQuantity
@@ -1606,6 +1623,14 @@ module Stigg
1606
1623
  displayName
1607
1624
  }
1608
1625
  blockSize
1626
+ topUpCustomCurrencyId
1627
+ customCurrency {
1628
+ displayName
1629
+ units {
1630
+ singular
1631
+ plural
1632
+ }
1633
+ }
1609
1634
  }
1610
1635
  GRAPHQL
1611
1636
 
@@ -4264,13 +4264,13 @@
4264
4264
  },
4265
4265
  {
4266
4266
  "name": "COUPON",
4267
- "description": "Coupon resources, only write is allowed",
4267
+ "description": "Coupon resources, read and write are allowed",
4268
4268
  "isDeprecated": false,
4269
4269
  "deprecationReason": null
4270
4270
  },
4271
4271
  {
4272
4272
  "name": "CUSTOMER",
4273
- "description": "Customer resources, only write is allowed",
4273
+ "description": "Customer resources, read and write are allowed",
4274
4274
  "isDeprecated": false,
4275
4275
  "deprecationReason": null
4276
4276
  },
@@ -4280,9 +4280,15 @@
4280
4280
  "isDeprecated": false,
4281
4281
  "deprecationReason": null
4282
4282
  },
4283
+ {
4284
+ "name": "EVENT_QUEUE",
4285
+ "description": "Event queue credentials, only read is allowed",
4286
+ "isDeprecated": false,
4287
+ "deprecationReason": null
4288
+ },
4283
4289
  {
4284
4290
  "name": "SUBSCRIPTION",
4285
- "description": "Subscription resources, only write is allowed",
4291
+ "description": "Subscription resources, read and write are allowed",
4286
4292
  "isDeprecated": false,
4287
4293
  "deprecationReason": null
4288
4294
  }
@@ -14897,6 +14903,18 @@
14897
14903
  "isDeprecated": false,
14898
14904
  "deprecationReason": null
14899
14905
  },
14906
+ {
14907
+ "name": "addonQuantity",
14908
+ "description": "The quantity of the addon subscription",
14909
+ "args": [],
14910
+ "type": {
14911
+ "kind": "SCALAR",
14912
+ "name": "Float",
14913
+ "ofType": null
14914
+ },
14915
+ "isDeprecated": false,
14916
+ "deprecationReason": null
14917
+ },
14900
14918
  {
14901
14919
  "name": "amount",
14902
14920
  "description": "The amount of the credit grant",
@@ -14913,6 +14931,18 @@
14913
14931
  "isDeprecated": false,
14914
14932
  "deprecationReason": null
14915
14933
  },
14934
+ {
14935
+ "name": "baseAmount",
14936
+ "description": "Base amount before dependency multiplication",
14937
+ "args": [],
14938
+ "type": {
14939
+ "kind": "SCALAR",
14940
+ "name": "Float",
14941
+ "ofType": null
14942
+ },
14943
+ "isDeprecated": false,
14944
+ "deprecationReason": null
14945
+ },
14916
14946
  {
14917
14947
  "name": "cadence",
14918
14948
  "description": "The cadence for recurring grants (MONTH or YEAR).",
@@ -14925,6 +14955,18 @@
14925
14955
  "isDeprecated": false,
14926
14956
  "deprecationReason": null
14927
14957
  },
14958
+ {
14959
+ "name": "dependencyFeatureEntitlement",
14960
+ "description": "The feature entitlement this credit depends on (e.g. seats)",
14961
+ "args": [],
14962
+ "type": {
14963
+ "kind": "OBJECT",
14964
+ "name": "FeatureEntitlement",
14965
+ "ofType": null
14966
+ },
14967
+ "isDeprecated": false,
14968
+ "deprecationReason": null
14969
+ },
14928
14970
  {
14929
14971
  "name": "effectiveAt",
14930
14972
  "description": "The effective date of the credit grant",
@@ -14969,6 +15011,22 @@
14969
15011
  "isDeprecated": false,
14970
15012
  "deprecationReason": null
14971
15013
  },
15014
+ {
15015
+ "name": "isEffectiveEntitlement",
15016
+ "description": "Indicates whether this entitlement is currently active and in effect.",
15017
+ "args": [],
15018
+ "type": {
15019
+ "kind": "NON_NULL",
15020
+ "name": null,
15021
+ "ofType": {
15022
+ "kind": "SCALAR",
15023
+ "name": "Boolean",
15024
+ "ofType": null
15025
+ }
15026
+ },
15027
+ "isDeprecated": false,
15028
+ "deprecationReason": null
15029
+ },
14972
15030
  {
14973
15031
  "name": "plan",
14974
15032
  "description": "The plan associated with this grant, if applicable.",
@@ -16965,6 +17023,18 @@
16965
17023
  "isDeprecated": false,
16966
17024
  "deprecationReason": null
16967
17025
  },
17026
+ {
17027
+ "name": "CREDITS_CONSUMPTION_TRANSFER_SOURCE",
17028
+ "description": "Credits consumption transfer source",
17029
+ "isDeprecated": false,
17030
+ "deprecationReason": null
17031
+ },
17032
+ {
17033
+ "name": "CREDITS_CONSUMPTION_TRANSFER_TARGET",
17034
+ "description": "Credits consumption transfer target",
17035
+ "isDeprecated": false,
17036
+ "deprecationReason": null
17037
+ },
16968
17038
  {
16969
17039
  "name": "CREDITS_EXPIRED",
16970
17040
  "description": "Credits expired",
@@ -39405,6 +39475,18 @@
39405
39475
  },
39406
39476
  "isDeprecated": false,
39407
39477
  "deprecationReason": null
39478
+ },
39479
+ {
39480
+ "name": "usageLimit",
39481
+ "description": "Usage limit of the dependency feature entitlement",
39482
+ "args": [],
39483
+ "type": {
39484
+ "kind": "SCALAR",
39485
+ "name": "Float",
39486
+ "ofType": null
39487
+ },
39488
+ "isDeprecated": false,
39489
+ "deprecationReason": null
39408
39490
  }
39409
39491
  ],
39410
39492
  "inputFields": null,
@@ -47217,6 +47299,26 @@
47217
47299
  "isDeprecated": false,
47218
47300
  "deprecationReason": null
47219
47301
  },
47302
+ {
47303
+ "name": "entitlements",
47304
+ "description": "Feature and credit entitlements for the subscription.",
47305
+ "type": {
47306
+ "kind": "LIST",
47307
+ "name": null,
47308
+ "ofType": {
47309
+ "kind": "NON_NULL",
47310
+ "name": null,
47311
+ "ofType": {
47312
+ "kind": "INPUT_OBJECT",
47313
+ "name": "SubscriptionEntitlementInputV2",
47314
+ "ofType": null
47315
+ }
47316
+ }
47317
+ },
47318
+ "defaultValue": null,
47319
+ "isDeprecated": false,
47320
+ "deprecationReason": null
47321
+ },
47220
47322
  {
47221
47323
  "name": "planId",
47222
47324
  "description": null,
@@ -47271,7 +47373,7 @@
47271
47373
  },
47272
47374
  {
47273
47375
  "name": "subscriptionEntitlements",
47274
- "description": null,
47376
+ "description": "Feature entitlements for the subscription. Deprecated: use entitlements instead.",
47275
47377
  "type": {
47276
47378
  "kind": "LIST",
47277
47379
  "name": null,
@@ -60046,6 +60148,18 @@
60046
60148
  "name": "FeatureDependency",
60047
60149
  "ofType": null
60048
60150
  },
60151
+ "isDeprecated": true,
60152
+ "deprecationReason": "Use dependencyFeature instead"
60153
+ },
60154
+ {
60155
+ "name": "dependencyFeature",
60156
+ "description": "The feature dependency information for this entitlement (credit entitlements only). The entitlement value will be calculated based on the dependency feature usage limit",
60157
+ "args": [],
60158
+ "type": {
60159
+ "kind": "OBJECT",
60160
+ "name": "Feature",
60161
+ "ofType": null
60162
+ },
60049
60163
  "isDeprecated": false,
60050
60164
  "deprecationReason": null
60051
60165
  },
@@ -61972,6 +62086,18 @@
61972
62086
  "name": "FeatureDependency",
61973
62087
  "ofType": null
61974
62088
  },
62089
+ "isDeprecated": true,
62090
+ "deprecationReason": "Use dependencyFeature instead"
62091
+ },
62092
+ {
62093
+ "name": "dependencyFeature",
62094
+ "description": "The feature dependency information for this entitlement (credit entitlements only). The entitlement value will be calculated based on the dependency feature usage limit",
62095
+ "args": [],
62096
+ "type": {
62097
+ "kind": "OBJECT",
62098
+ "name": "Feature",
62099
+ "ofType": null
62100
+ },
61975
62101
  "isDeprecated": false,
61976
62102
  "deprecationReason": null
61977
62103
  },
@@ -64216,6 +64342,18 @@
64216
64342
  "name": "FeatureDependency",
64217
64343
  "ofType": null
64218
64344
  },
64345
+ "isDeprecated": true,
64346
+ "deprecationReason": "Use dependencyFeature instead"
64347
+ },
64348
+ {
64349
+ "name": "dependencyFeature",
64350
+ "description": "The feature dependency information for this entitlement (credit entitlements only). The entitlement value will be calculated based on the dependency feature usage limit",
64351
+ "args": [],
64352
+ "type": {
64353
+ "kind": "OBJECT",
64354
+ "name": "Feature",
64355
+ "ofType": null
64356
+ },
64219
64357
  "isDeprecated": false,
64220
64358
  "deprecationReason": null
64221
64359
  },
@@ -69279,6 +69417,18 @@
69279
69417
  "name": "PaywallPrice",
69280
69418
  "description": "DTO for a price",
69281
69419
  "fields": [
69420
+ {
69421
+ "name": "billingCadence",
69422
+ "description": "The billing cadence of the price",
69423
+ "args": [],
69424
+ "type": {
69425
+ "kind": "ENUM",
69426
+ "name": "BillingCadence",
69427
+ "ofType": null
69428
+ },
69429
+ "isDeprecated": false,
69430
+ "deprecationReason": null
69431
+ },
69282
69432
  {
69283
69433
  "name": "billingCountryCode",
69284
69434
  "description": "The country code for billing, e.g. \"US\"",
@@ -69359,6 +69509,18 @@
69359
69509
  "isDeprecated": false,
69360
69510
  "deprecationReason": null
69361
69511
  },
69512
+ {
69513
+ "name": "customCurrency",
69514
+ "description": "The custom currency of the price this price applies to",
69515
+ "args": [],
69516
+ "type": {
69517
+ "kind": "OBJECT",
69518
+ "name": "CustomCurrency",
69519
+ "ofType": null
69520
+ },
69521
+ "isDeprecated": false,
69522
+ "deprecationReason": null
69523
+ },
69362
69524
  {
69363
69525
  "name": "feature",
69364
69526
  "description": "The feature associated with this price, if applicable",
@@ -69450,6 +69612,18 @@
69450
69612
  },
69451
69613
  "isDeprecated": false,
69452
69614
  "deprecationReason": null
69615
+ },
69616
+ {
69617
+ "name": "topUpCustomCurrencyId",
69618
+ "description": "The ID of the custom currency this price applies to",
69619
+ "args": [],
69620
+ "type": {
69621
+ "kind": "SCALAR",
69622
+ "name": "UUID",
69623
+ "ofType": null
69624
+ },
69625
+ "isDeprecated": false,
69626
+ "deprecationReason": null
69453
69627
  }
69454
69628
  ],
69455
69629
  "inputFields": null,
@@ -83173,8 +83347,8 @@
83173
83347
  "ofType": null
83174
83348
  }
83175
83349
  },
83176
- "isDeprecated": false,
83177
- "deprecationReason": null
83350
+ "isDeprecated": true,
83351
+ "deprecationReason": "Use credit entitlements to retrieve credit balance instead."
83178
83352
  },
83179
83353
  {
83180
83354
  "name": "creditGrants",
@@ -90345,7 +90519,7 @@
90345
90519
  "fields": [
90346
90520
  {
90347
90521
  "name": "creditBalanceUpdated",
90348
- "description": "Subscription for credit balance updates for a specific customer",
90522
+ "description": "Subscribe to credit balance update events",
90349
90523
  "args": [],
90350
90524
  "type": {
90351
90525
  "kind": "NON_NULL",
@@ -90356,8 +90530,8 @@
90356
90530
  "ofType": null
90357
90531
  }
90358
90532
  },
90359
- "isDeprecated": false,
90360
- "deprecationReason": null
90533
+ "isDeprecated": true,
90534
+ "deprecationReason": "Use credit entitlement update events instead."
90361
90535
  },
90362
90536
  {
90363
90537
  "name": "entitlementsUpdated",
data/lib/stigg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stigg
4
- VERSION = "6.2.3"
4
+ VERSION = "6.5.0"
5
5
  end
data/package.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "@stigg/api-client-ruby",
3
+ "version": "6.5.0"
4
+ }
data/project.json CHANGED
@@ -1,36 +1,41 @@
1
1
  {
2
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
3
- "sourceRoot": "packages/api-client-ruby/lib",
4
- "projectType": "library",
5
- "implicitDependencies": ["api-client-schema"],
2
+ "name": "@stigg/api-client-ruby",
3
+ "tags": ["runtime:ruby"],
4
+ "implicitDependencies": ["@stigg/api-client-schema"],
6
5
  "targets": {
7
6
  "generate": {
8
7
  "executor": "nx:run-commands",
9
8
  "options": {
10
9
  "command": "./scripts/generate.sh",
11
- "cwd": "packages/api-client-ruby"
10
+ "cwd": "packages/api-clients/api-client-ruby"
12
11
  }
13
12
  },
14
- "publish": {
13
+ "build": {
14
+ "dependsOn": ["generate"]
15
+ },
16
+ "nx-release-publish": {
17
+ "dependsOn": ["generate", "^nx-release-publish"],
15
18
  "executor": "nx:run-commands",
16
19
  "options": {
17
- "command": "./scripts/publish.sh {args.ver}",
18
- "cwd": "packages/api-client-ruby"
20
+ "command": "./scripts/publish.sh",
21
+ "cwd": "packages/api-clients/api-client-ruby"
19
22
  }
20
23
  },
21
24
  "test": {
25
+ "dependsOn": ["generate"],
22
26
  "executor": "nx:run-commands",
23
27
  "options": {
24
28
  "command": "bundle exec rake spec",
25
- "cwd": "packages/api-client-ruby"
26
- },
27
- "dependsOn": [
28
- {
29
- "projects": "self",
30
- "target": "generate"
31
- }
32
- ]
29
+ "cwd": "packages/api-clients/api-client-ruby"
30
+ }
31
+ },
32
+ "lint": {
33
+ "dependsOn": ["generate"],
34
+ "executor": "nx:run-commands",
35
+ "options": {
36
+ "command": "bundle exec rubocop",
37
+ "cwd": "packages/api-clients/api-client-ruby"
38
+ }
33
39
  }
34
- },
35
- "tags": []
40
+ }
36
41
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stigg-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.3
4
+ version: 6.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stigg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-09 00:00:00.000000000 Z
11
+ date: 2026-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphlient
@@ -69,6 +69,7 @@ files:
69
69
  - lib/stigg/generated/operations.rb
70
70
  - lib/stigg/generated/schema.json
71
71
  - lib/stigg/version.rb
72
+ - package.json
72
73
  - project.json
73
74
  - stigg-api-client.gemspec
74
75
  homepage: https://stigg.io
@@ -76,7 +77,7 @@ licenses:
76
77
  - MIT
77
78
  metadata:
78
79
  homepage_uri: https://stigg.io
79
- post_install_message:
80
+ post_install_message:
80
81
  rdoc_options: []
81
82
  require_paths:
82
83
  - lib
@@ -92,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
93
  version: '0'
93
94
  requirements: []
94
95
  rubygems_version: 3.4.19
95
- signing_key:
96
+ signing_key:
96
97
  specification_version: 4
97
98
  summary: Stigg API Client
98
99
  test_files: []