stigg-api-client 6.2.3 → 6.4.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 +4 -4
- data/.rubocop.yml +11 -0
- data/Gemfile.lock +1 -1
- data/lib/stigg/client.rb +5 -5
- data/lib/stigg/generated/operations.rb +17 -0
- data/lib/stigg/generated/schema.json +114 -8
- data/lib/stigg/version.rb +1 -1
- data/package.json +4 -0
- data/project.json +23 -18
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbedd1efce76b07c6cee34b7a2ee82bbd0fded55ca01736f605094ef30732e63
|
|
4
|
+
data.tar.gz: 171386ca619fe12784c3c5cb6a84eea366ef2095b9811146685c28b92ab076f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f3cc1dc7963350b12246b051582f028caf61ee2591c869b933771ba645b93fbf58d95dccdc282cc9e209c58e8ddc25ef4720873f12a291b66b6dd72f7994471
|
|
7
|
+
data.tar.gz: 35d6eca99e9bfa21dce3ae33adda011385bb7743b431334d6e743d3522b3660ffca8a739d0126352c77924ef0a5a0d2be1218dad43ffc7744e4ae8a042ed90c9
|
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
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 =
|
|
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!({
|
|
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__,
|
|
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
|
|
|
@@ -1583,6 +1591,7 @@ module Stigg
|
|
|
1583
1591
|
fragment MockPaywallPriceFragment on PaywallPrice {
|
|
1584
1592
|
billingModel
|
|
1585
1593
|
billingPeriod
|
|
1594
|
+
billingCadence
|
|
1586
1595
|
billingId
|
|
1587
1596
|
minUnitQuantity
|
|
1588
1597
|
maxUnitQuantity
|
|
@@ -1606,6 +1615,14 @@ module Stigg
|
|
|
1606
1615
|
displayName
|
|
1607
1616
|
}
|
|
1608
1617
|
blockSize
|
|
1618
|
+
topUpCustomCurrencyId
|
|
1619
|
+
customCurrency {
|
|
1620
|
+
displayName
|
|
1621
|
+
units {
|
|
1622
|
+
singular
|
|
1623
|
+
plural
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1609
1626
|
}
|
|
1610
1627
|
GRAPHQL
|
|
1611
1628
|
|
|
@@ -4264,13 +4264,13 @@
|
|
|
4264
4264
|
},
|
|
4265
4265
|
{
|
|
4266
4266
|
"name": "COUPON",
|
|
4267
|
-
"description": "Coupon resources,
|
|
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,
|
|
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,
|
|
4291
|
+
"description": "Subscription resources, read and write are allowed",
|
|
4286
4292
|
"isDeprecated": false,
|
|
4287
4293
|
"deprecationReason": null
|
|
4288
4294
|
}
|
|
@@ -14913,6 +14919,18 @@
|
|
|
14913
14919
|
"isDeprecated": false,
|
|
14914
14920
|
"deprecationReason": null
|
|
14915
14921
|
},
|
|
14922
|
+
{
|
|
14923
|
+
"name": "baseAmount",
|
|
14924
|
+
"description": "Base amount before dependency multiplication",
|
|
14925
|
+
"args": [],
|
|
14926
|
+
"type": {
|
|
14927
|
+
"kind": "SCALAR",
|
|
14928
|
+
"name": "Float",
|
|
14929
|
+
"ofType": null
|
|
14930
|
+
},
|
|
14931
|
+
"isDeprecated": false,
|
|
14932
|
+
"deprecationReason": null
|
|
14933
|
+
},
|
|
14916
14934
|
{
|
|
14917
14935
|
"name": "cadence",
|
|
14918
14936
|
"description": "The cadence for recurring grants (MONTH or YEAR).",
|
|
@@ -14925,6 +14943,18 @@
|
|
|
14925
14943
|
"isDeprecated": false,
|
|
14926
14944
|
"deprecationReason": null
|
|
14927
14945
|
},
|
|
14946
|
+
{
|
|
14947
|
+
"name": "dependency",
|
|
14948
|
+
"description": "Feature dependency information",
|
|
14949
|
+
"args": [],
|
|
14950
|
+
"type": {
|
|
14951
|
+
"kind": "OBJECT",
|
|
14952
|
+
"name": "FeatureDependency",
|
|
14953
|
+
"ofType": null
|
|
14954
|
+
},
|
|
14955
|
+
"isDeprecated": false,
|
|
14956
|
+
"deprecationReason": null
|
|
14957
|
+
},
|
|
14928
14958
|
{
|
|
14929
14959
|
"name": "effectiveAt",
|
|
14930
14960
|
"description": "The effective date of the credit grant",
|
|
@@ -14969,6 +14999,22 @@
|
|
|
14969
14999
|
"isDeprecated": false,
|
|
14970
15000
|
"deprecationReason": null
|
|
14971
15001
|
},
|
|
15002
|
+
{
|
|
15003
|
+
"name": "isEffectiveEntitlement",
|
|
15004
|
+
"description": "Indicates whether this entitlement is currently active and in effect.",
|
|
15005
|
+
"args": [],
|
|
15006
|
+
"type": {
|
|
15007
|
+
"kind": "NON_NULL",
|
|
15008
|
+
"name": null,
|
|
15009
|
+
"ofType": {
|
|
15010
|
+
"kind": "SCALAR",
|
|
15011
|
+
"name": "Boolean",
|
|
15012
|
+
"ofType": null
|
|
15013
|
+
}
|
|
15014
|
+
},
|
|
15015
|
+
"isDeprecated": false,
|
|
15016
|
+
"deprecationReason": null
|
|
15017
|
+
},
|
|
14972
15018
|
{
|
|
14973
15019
|
"name": "plan",
|
|
14974
15020
|
"description": "The plan associated with this grant, if applicable.",
|
|
@@ -33247,6 +33293,18 @@
|
|
|
33247
33293
|
"isDeprecated": false,
|
|
33248
33294
|
"deprecationReason": null
|
|
33249
33295
|
},
|
|
33296
|
+
{
|
|
33297
|
+
"name": "CreditChargeCoexistenceError",
|
|
33298
|
+
"description": "Plans with recurring credit charges cannot have other pricing models (FLAT_FEE, USAGE_BASED, MINIMUM_SPEND, or non-credit PER_UNIT). Recurring credit charges must be the only pricing model on the plan.",
|
|
33299
|
+
"isDeprecated": false,
|
|
33300
|
+
"deprecationReason": null
|
|
33301
|
+
},
|
|
33302
|
+
{
|
|
33303
|
+
"name": "CreditChargeValidationError",
|
|
33304
|
+
"description": "Credit-based plan changes require prorationBehavior NONE and billingCycleAnchor matching the scheduleStrategy (NOW for IMMEDIATE, UNCHANGED for END_OF_BILLING_PERIOD).",
|
|
33305
|
+
"isDeprecated": false,
|
|
33306
|
+
"deprecationReason": null
|
|
33307
|
+
},
|
|
33250
33308
|
{
|
|
33251
33309
|
"name": "CreditGrantAlreadyVoided",
|
|
33252
33310
|
"description": "Credit grant already voided",
|
|
@@ -39405,6 +39463,18 @@
|
|
|
39405
39463
|
},
|
|
39406
39464
|
"isDeprecated": false,
|
|
39407
39465
|
"deprecationReason": null
|
|
39466
|
+
},
|
|
39467
|
+
{
|
|
39468
|
+
"name": "usageLimit",
|
|
39469
|
+
"description": "Usage limit of the dependency feature entitlement",
|
|
39470
|
+
"args": [],
|
|
39471
|
+
"type": {
|
|
39472
|
+
"kind": "SCALAR",
|
|
39473
|
+
"name": "Float",
|
|
39474
|
+
"ofType": null
|
|
39475
|
+
},
|
|
39476
|
+
"isDeprecated": false,
|
|
39477
|
+
"deprecationReason": null
|
|
39408
39478
|
}
|
|
39409
39479
|
],
|
|
39410
39480
|
"inputFields": null,
|
|
@@ -69279,6 +69349,18 @@
|
|
|
69279
69349
|
"name": "PaywallPrice",
|
|
69280
69350
|
"description": "DTO for a price",
|
|
69281
69351
|
"fields": [
|
|
69352
|
+
{
|
|
69353
|
+
"name": "billingCadence",
|
|
69354
|
+
"description": "The billing cadence of the price",
|
|
69355
|
+
"args": [],
|
|
69356
|
+
"type": {
|
|
69357
|
+
"kind": "ENUM",
|
|
69358
|
+
"name": "BillingCadence",
|
|
69359
|
+
"ofType": null
|
|
69360
|
+
},
|
|
69361
|
+
"isDeprecated": false,
|
|
69362
|
+
"deprecationReason": null
|
|
69363
|
+
},
|
|
69282
69364
|
{
|
|
69283
69365
|
"name": "billingCountryCode",
|
|
69284
69366
|
"description": "The country code for billing, e.g. \"US\"",
|
|
@@ -69359,6 +69441,18 @@
|
|
|
69359
69441
|
"isDeprecated": false,
|
|
69360
69442
|
"deprecationReason": null
|
|
69361
69443
|
},
|
|
69444
|
+
{
|
|
69445
|
+
"name": "customCurrency",
|
|
69446
|
+
"description": "The custom currency of the price this price applies to",
|
|
69447
|
+
"args": [],
|
|
69448
|
+
"type": {
|
|
69449
|
+
"kind": "OBJECT",
|
|
69450
|
+
"name": "CustomCurrency",
|
|
69451
|
+
"ofType": null
|
|
69452
|
+
},
|
|
69453
|
+
"isDeprecated": false,
|
|
69454
|
+
"deprecationReason": null
|
|
69455
|
+
},
|
|
69362
69456
|
{
|
|
69363
69457
|
"name": "feature",
|
|
69364
69458
|
"description": "The feature associated with this price, if applicable",
|
|
@@ -69450,6 +69544,18 @@
|
|
|
69450
69544
|
},
|
|
69451
69545
|
"isDeprecated": false,
|
|
69452
69546
|
"deprecationReason": null
|
|
69547
|
+
},
|
|
69548
|
+
{
|
|
69549
|
+
"name": "topUpCustomCurrencyId",
|
|
69550
|
+
"description": "The ID of the custom currency this price applies to",
|
|
69551
|
+
"args": [],
|
|
69552
|
+
"type": {
|
|
69553
|
+
"kind": "SCALAR",
|
|
69554
|
+
"name": "UUID",
|
|
69555
|
+
"ofType": null
|
|
69556
|
+
},
|
|
69557
|
+
"isDeprecated": false,
|
|
69558
|
+
"deprecationReason": null
|
|
69453
69559
|
}
|
|
69454
69560
|
],
|
|
69455
69561
|
"inputFields": null,
|
|
@@ -83173,8 +83279,8 @@
|
|
|
83173
83279
|
"ofType": null
|
|
83174
83280
|
}
|
|
83175
83281
|
},
|
|
83176
|
-
"isDeprecated":
|
|
83177
|
-
"deprecationReason":
|
|
83282
|
+
"isDeprecated": true,
|
|
83283
|
+
"deprecationReason": "Use credit entitlements to retrieve credit balance instead."
|
|
83178
83284
|
},
|
|
83179
83285
|
{
|
|
83180
83286
|
"name": "creditGrants",
|
|
@@ -90345,7 +90451,7 @@
|
|
|
90345
90451
|
"fields": [
|
|
90346
90452
|
{
|
|
90347
90453
|
"name": "creditBalanceUpdated",
|
|
90348
|
-
"description": "
|
|
90454
|
+
"description": "Subscribe to credit balance update events",
|
|
90349
90455
|
"args": [],
|
|
90350
90456
|
"type": {
|
|
90351
90457
|
"kind": "NON_NULL",
|
|
@@ -90356,8 +90462,8 @@
|
|
|
90356
90462
|
"ofType": null
|
|
90357
90463
|
}
|
|
90358
90464
|
},
|
|
90359
|
-
"isDeprecated":
|
|
90360
|
-
"deprecationReason":
|
|
90465
|
+
"isDeprecated": true,
|
|
90466
|
+
"deprecationReason": "Use credit entitlement update events instead."
|
|
90361
90467
|
},
|
|
90362
90468
|
{
|
|
90363
90469
|
"name": "entitlementsUpdated",
|
data/lib/stigg/version.rb
CHANGED
data/package.json
ADDED
data/project.json
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
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
|
-
"
|
|
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
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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.
|
|
4
|
+
version: 6.4.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-
|
|
11
|
+
date: 2026-03-17 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: []
|