@stigg/typescript-mcp 0.1.0-beta.35 → 0.1.0-beta.37
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.
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +2 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +2 -0
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +231 -127
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +231 -127
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +12 -0
- package/methods.js.map +1 -1
- package/methods.mjs +12 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +2 -0
- package/src/local-docs-search.ts +259 -127
- package/src/methods.ts +12 -0
- package/src/server.ts +1 -1
package/src/local-docs-search.ts
CHANGED
|
@@ -100,7 +100,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
100
100
|
'CustomerRetrieveParams parameters = new() { ID = "x" };\n\nvar customerResponse = await client.V1.Customers.Retrieve(parameters);\n\nConsole.WriteLine(customerResponse);',
|
|
101
101
|
},
|
|
102
102
|
http: {
|
|
103
|
-
example: 'curl https://api.stigg.io/api/v1/customers/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
103
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
104
104
|
},
|
|
105
105
|
},
|
|
106
106
|
},
|
|
@@ -168,7 +168,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
168
168
|
},
|
|
169
169
|
http: {
|
|
170
170
|
example:
|
|
171
|
-
"curl https://api.stigg.io/api/v1/customers/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
171
|
+
"curl https://edge.api.stigg.io/api/v1/customers/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
172
172
|
},
|
|
173
173
|
},
|
|
174
174
|
},
|
|
@@ -230,7 +230,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
230
230
|
'CustomerListParams parameters = new();\n\nvar page = await client.V1.Customers.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
231
231
|
},
|
|
232
232
|
http: {
|
|
233
|
-
example: 'curl https://api.stigg.io/api/v1/customers \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
233
|
+
example: 'curl https://edge.api.stigg.io/api/v1/customers \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
234
234
|
},
|
|
235
235
|
},
|
|
236
236
|
},
|
|
@@ -300,7 +300,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
300
300
|
},
|
|
301
301
|
http: {
|
|
302
302
|
example:
|
|
303
|
-
'curl https://api.stigg.io/api/v1/customers \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id"\n }\'',
|
|
303
|
+
'curl https://edge.api.stigg.io/api/v1/customers \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id"\n }\'',
|
|
304
304
|
},
|
|
305
305
|
},
|
|
306
306
|
},
|
|
@@ -355,7 +355,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
355
355
|
},
|
|
356
356
|
http: {
|
|
357
357
|
example:
|
|
358
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
358
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
359
359
|
},
|
|
360
360
|
},
|
|
361
361
|
},
|
|
@@ -409,7 +409,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
409
409
|
},
|
|
410
410
|
http: {
|
|
411
411
|
example:
|
|
412
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
412
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
413
413
|
},
|
|
414
414
|
},
|
|
415
415
|
},
|
|
@@ -469,7 +469,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
469
469
|
},
|
|
470
470
|
http: {
|
|
471
471
|
example:
|
|
472
|
-
'curl https://api.stigg.io/api/v1/customers/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customers": [\n {\n "id": "id",\n "email": "dev@stainless.com",\n "name": "name"\n }\n ]\n }\'',
|
|
472
|
+
'curl https://edge.api.stigg.io/api/v1/customers/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customers": [\n {\n "id": "id",\n "email": "dev@stainless.com",\n "name": "name"\n }\n ]\n }\'',
|
|
473
473
|
},
|
|
474
474
|
},
|
|
475
475
|
},
|
|
@@ -529,7 +529,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
529
529
|
},
|
|
530
530
|
http: {
|
|
531
531
|
example:
|
|
532
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/resources \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
532
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/resources \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
533
533
|
},
|
|
534
534
|
},
|
|
535
535
|
},
|
|
@@ -584,7 +584,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
584
584
|
},
|
|
585
585
|
http: {
|
|
586
586
|
example:
|
|
587
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
587
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
588
588
|
},
|
|
589
589
|
},
|
|
590
590
|
},
|
|
@@ -648,7 +648,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
648
648
|
},
|
|
649
649
|
http: {
|
|
650
650
|
example:
|
|
651
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
651
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
652
652
|
},
|
|
653
653
|
},
|
|
654
654
|
},
|
|
@@ -712,7 +712,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
712
712
|
},
|
|
713
713
|
http: {
|
|
714
714
|
example:
|
|
715
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/payment-method \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "integrationId": "integrationId",\n "paymentMethodId": "paymentMethodId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
715
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/payment-method \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "integrationId": "integrationId",\n "paymentMethodId": "paymentMethodId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
716
716
|
},
|
|
717
717
|
},
|
|
718
718
|
},
|
|
@@ -767,7 +767,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
767
767
|
},
|
|
768
768
|
http: {
|
|
769
769
|
example:
|
|
770
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/payment-method \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
770
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/payment-method \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
771
771
|
},
|
|
772
772
|
},
|
|
773
773
|
},
|
|
@@ -830,7 +830,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
830
830
|
},
|
|
831
831
|
http: {
|
|
832
832
|
example:
|
|
833
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
833
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
834
834
|
},
|
|
835
835
|
},
|
|
836
836
|
},
|
|
@@ -891,7 +891,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
891
891
|
},
|
|
892
892
|
http: {
|
|
893
893
|
example:
|
|
894
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "promotionalEntitlements": [\n {\n "customEndDate": "2019-12-27T18:11:19.117Z",\n "enumValues": [\n "string"\n ],\n "featureId": "featureId",\n "hasSoftLimit": true,\n "hasUnlimitedUsage": true,\n "isVisible": true,\n "monthlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "period": "1 week",\n "resetPeriod": "YEAR",\n "usageLimit": -9007199254740991,\n "weeklyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "yearlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n }\n }\n ]\n }\'',
|
|
894
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/promotional-entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "promotionalEntitlements": [\n {\n "customEndDate": "2019-12-27T18:11:19.117Z",\n "enumValues": [\n "string"\n ],\n "featureId": "featureId",\n "hasSoftLimit": true,\n "hasUnlimitedUsage": true,\n "isVisible": true,\n "monthlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "period": "1 week",\n "resetPeriod": "YEAR",\n "usageLimit": -9007199254740991,\n "weeklyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n },\n "yearlyResetPeriodConfiguration": {\n "accordingTo": "SubscriptionStart"\n }\n }\n ]\n }\'',
|
|
895
895
|
},
|
|
896
896
|
},
|
|
897
897
|
},
|
|
@@ -947,7 +947,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
947
947
|
},
|
|
948
948
|
http: {
|
|
949
949
|
example:
|
|
950
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/promotional-entitlements/$FEATURE_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
950
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/promotional-entitlements/$FEATURE_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
951
951
|
},
|
|
952
952
|
},
|
|
953
953
|
},
|
|
@@ -1009,7 +1009,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1009
1009
|
},
|
|
1010
1010
|
http: {
|
|
1011
1011
|
example:
|
|
1012
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/integrations \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1012
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1013
1013
|
},
|
|
1014
1014
|
},
|
|
1015
1015
|
},
|
|
@@ -1072,7 +1072,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1072
1072
|
},
|
|
1073
1073
|
http: {
|
|
1074
1074
|
example:
|
|
1075
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/integrations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "syncedEntityId": "syncedEntityId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
1075
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "syncedEntityId": "syncedEntityId",\n "vendorIdentifier": "AUTH0"\n }\'',
|
|
1076
1076
|
},
|
|
1077
1077
|
},
|
|
1078
1078
|
},
|
|
@@ -1127,7 +1127,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1127
1127
|
},
|
|
1128
1128
|
http: {
|
|
1129
1129
|
example:
|
|
1130
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1130
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1131
1131
|
},
|
|
1132
1132
|
},
|
|
1133
1133
|
},
|
|
@@ -1188,7 +1188,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1188
1188
|
},
|
|
1189
1189
|
http: {
|
|
1190
1190
|
example:
|
|
1191
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "syncedEntityId": "syncedEntityId"\n }\'',
|
|
1191
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "syncedEntityId": "syncedEntityId"\n }\'',
|
|
1192
1192
|
},
|
|
1193
1193
|
},
|
|
1194
1194
|
},
|
|
@@ -1243,7 +1243,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1243
1243
|
},
|
|
1244
1244
|
http: {
|
|
1245
1245
|
example:
|
|
1246
|
-
'curl https://api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1246
|
+
'curl https://edge.api.stigg.io/api/v1/customers/$ID/integrations/$INTEGRATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1247
1247
|
},
|
|
1248
1248
|
},
|
|
1249
1249
|
},
|
|
@@ -1297,7 +1297,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1297
1297
|
'SubscriptionRetrieveParams parameters = new() { ID = "x" };\n\nvar subscription = await client.V1.Subscriptions.Retrieve(parameters);\n\nConsole.WriteLine(subscription);',
|
|
1298
1298
|
},
|
|
1299
1299
|
http: {
|
|
1300
|
-
example:
|
|
1300
|
+
example:
|
|
1301
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1301
1302
|
},
|
|
1302
1303
|
},
|
|
1303
1304
|
},
|
|
@@ -1363,7 +1364,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1363
1364
|
'SubscriptionListParams parameters = new();\n\nvar page = await client.V1.Subscriptions.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
1364
1365
|
},
|
|
1365
1366
|
http: {
|
|
1366
|
-
example: 'curl https://api.stigg.io/api/v1/subscriptions \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1367
|
+
example: 'curl https://edge.api.stigg.io/api/v1/subscriptions \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1367
1368
|
},
|
|
1368
1369
|
},
|
|
1369
1370
|
},
|
|
@@ -1449,7 +1450,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1449
1450
|
},
|
|
1450
1451
|
http: {
|
|
1451
1452
|
example:
|
|
1452
|
-
'curl https://api.stigg.io/api/v1/subscriptions \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1453
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1453
1454
|
},
|
|
1454
1455
|
},
|
|
1455
1456
|
},
|
|
@@ -1510,7 +1511,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1510
1511
|
},
|
|
1511
1512
|
http: {
|
|
1512
1513
|
example:
|
|
1513
|
-
'curl https://api.stigg.io/api/v1/subscriptions/$ID/transfer \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationResourceId": "destinationResourceId"\n }\'',
|
|
1514
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/transfer \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationResourceId": "destinationResourceId"\n }\'',
|
|
1514
1515
|
},
|
|
1515
1516
|
},
|
|
1516
1517
|
},
|
|
@@ -1570,7 +1571,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1570
1571
|
},
|
|
1571
1572
|
http: {
|
|
1572
1573
|
example:
|
|
1573
|
-
"curl https://api.stigg.io/api/v1/subscriptions/$ID/migrate \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1574
|
+
"curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/migrate \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1574
1575
|
},
|
|
1575
1576
|
},
|
|
1576
1577
|
},
|
|
@@ -1631,7 +1632,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1631
1632
|
},
|
|
1632
1633
|
http: {
|
|
1633
1634
|
example:
|
|
1634
|
-
'curl https://api.stigg.io/api/v1/subscriptions/$ID/delegate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetCustomerId": "targetCustomerId"\n }\'',
|
|
1635
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/delegate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetCustomerId": "targetCustomerId"\n }\'',
|
|
1635
1636
|
},
|
|
1636
1637
|
},
|
|
1637
1638
|
},
|
|
@@ -1706,7 +1707,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1706
1707
|
},
|
|
1707
1708
|
http: {
|
|
1708
1709
|
example:
|
|
1709
|
-
'curl https://api.stigg.io/api/v1/subscriptions/preview \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1710
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/preview \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "customerId": "customerId",\n "planId": "planId"\n }\'',
|
|
1710
1711
|
},
|
|
1711
1712
|
},
|
|
1712
1713
|
},
|
|
@@ -1782,7 +1783,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1782
1783
|
},
|
|
1783
1784
|
http: {
|
|
1784
1785
|
example:
|
|
1785
|
-
"curl https://api.stigg.io/api/v1/subscriptions/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1786
|
+
"curl https://edge.api.stigg.io/api/v1/subscriptions/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1786
1787
|
},
|
|
1787
1788
|
},
|
|
1788
1789
|
},
|
|
@@ -1842,7 +1843,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1842
1843
|
},
|
|
1843
1844
|
http: {
|
|
1844
1845
|
example:
|
|
1845
|
-
'curl https://api.stigg.io/api/v1/subscriptions/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "subscriptions": [\n {\n "id": "id",\n "customerId": "customerId",\n "planId": "planId"\n }\n ]\n }\'',
|
|
1846
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "subscriptions": [\n {\n "id": "id",\n "customerId": "customerId",\n "planId": "planId"\n }\n ]\n }\'',
|
|
1846
1847
|
},
|
|
1847
1848
|
},
|
|
1848
1849
|
},
|
|
@@ -1905,7 +1906,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1905
1906
|
},
|
|
1906
1907
|
http: {
|
|
1907
1908
|
example:
|
|
1908
|
-
"curl https://api.stigg.io/api/v1/subscriptions/$ID/cancel \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1909
|
+
"curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/cancel \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
1909
1910
|
},
|
|
1910
1911
|
},
|
|
1911
1912
|
},
|
|
@@ -1959,7 +1960,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1959
1960
|
},
|
|
1960
1961
|
http: {
|
|
1961
1962
|
example:
|
|
1962
|
-
'curl https://api.stigg.io/api/v1/subscriptions/$ID/future-update/pending-payment \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1963
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/future-update/pending-payment \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
1963
1964
|
},
|
|
1964
1965
|
},
|
|
1965
1966
|
},
|
|
@@ -2013,7 +2014,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2013
2014
|
},
|
|
2014
2015
|
http: {
|
|
2015
2016
|
example:
|
|
2016
|
-
'curl https://api.stigg.io/api/v1/subscriptions/$ID/future-update/schedule \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2017
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/future-update/schedule \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2017
2018
|
},
|
|
2018
2019
|
},
|
|
2019
2020
|
},
|
|
@@ -2068,7 +2069,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2068
2069
|
},
|
|
2069
2070
|
http: {
|
|
2070
2071
|
example:
|
|
2071
|
-
"curl https://api.stigg.io/api/v1/subscriptions/$ID/usage/charge \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2072
|
+
"curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/usage/charge \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2072
2073
|
},
|
|
2073
2074
|
},
|
|
2074
2075
|
},
|
|
@@ -2121,7 +2122,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2121
2122
|
},
|
|
2122
2123
|
http: {
|
|
2123
2124
|
example:
|
|
2124
|
-
'curl https://api.stigg.io/api/v1/subscriptions/$ID/usage/sync \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2125
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/usage/sync \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2125
2126
|
},
|
|
2126
2127
|
},
|
|
2127
2128
|
},
|
|
@@ -2175,7 +2176,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2175
2176
|
},
|
|
2176
2177
|
http: {
|
|
2177
2178
|
example:
|
|
2178
|
-
'curl https://api.stigg.io/api/v1/subscriptions/$ID/invoice/paid \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2179
|
+
'curl https://edge.api.stigg.io/api/v1/subscriptions/$ID/invoice/paid \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2179
2180
|
},
|
|
2180
2181
|
},
|
|
2181
2182
|
},
|
|
@@ -2241,7 +2242,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2241
2242
|
},
|
|
2242
2243
|
http: {
|
|
2243
2244
|
example:
|
|
2244
|
-
'curl https://api.stigg.io/api/v1/coupons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "amountsOff": [\n {\n "amount": 0,\n "currency": "usd"\n }\n ],\n "description": "description",\n "durationInMonths": 1,\n "metadata": {\n "foo": "string"\n },\n "name": "name",\n "percentOff": 1\n }\'',
|
|
2245
|
+
'curl https://edge.api.stigg.io/api/v1/coupons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "amountsOff": [\n {\n "amount": 0,\n "currency": "usd"\n }\n ],\n "description": "description",\n "durationInMonths": 1,\n "metadata": {\n "foo": "string"\n },\n "name": "name",\n "percentOff": 1\n }\'',
|
|
2245
2246
|
},
|
|
2246
2247
|
},
|
|
2247
2248
|
},
|
|
@@ -2304,7 +2305,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2304
2305
|
'CouponListParams parameters = new();\n\nvar page = await client.V1.Coupons.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2305
2306
|
},
|
|
2306
2307
|
http: {
|
|
2307
|
-
example: 'curl https://api.stigg.io/api/v1/coupons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2308
|
+
example: 'curl https://edge.api.stigg.io/api/v1/coupons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2308
2309
|
},
|
|
2309
2310
|
},
|
|
2310
2311
|
},
|
|
@@ -2357,7 +2358,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2357
2358
|
'CouponRetrieveParams parameters = new() { ID = "x" };\n\nvar coupon = await client.V1.Coupons.Retrieve(parameters);\n\nConsole.WriteLine(coupon);',
|
|
2358
2359
|
},
|
|
2359
2360
|
http: {
|
|
2360
|
-
example: 'curl https://api.stigg.io/api/v1/coupons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2361
|
+
example: 'curl https://edge.api.stigg.io/api/v1/coupons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2361
2362
|
},
|
|
2362
2363
|
},
|
|
2363
2364
|
},
|
|
@@ -2418,7 +2419,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2418
2419
|
},
|
|
2419
2420
|
http: {
|
|
2420
2421
|
example:
|
|
2421
|
-
"curl https://api.stigg.io/api/v1/coupons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2422
|
+
"curl https://edge.api.stigg.io/api/v1/coupons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2422
2423
|
},
|
|
2423
2424
|
},
|
|
2424
2425
|
},
|
|
@@ -2472,7 +2473,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2472
2473
|
},
|
|
2473
2474
|
http: {
|
|
2474
2475
|
example:
|
|
2475
|
-
'curl https://api.stigg.io/api/v1/coupons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2476
|
+
'curl https://edge.api.stigg.io/api/v1/coupons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2476
2477
|
},
|
|
2477
2478
|
},
|
|
2478
2479
|
},
|
|
@@ -2531,7 +2532,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2531
2532
|
},
|
|
2532
2533
|
http: {
|
|
2533
2534
|
example:
|
|
2534
|
-
'curl https://api.stigg.io/api/v1/events \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "events": [\n {\n "customerId": "customerId",\n "eventName": "x",\n "idempotencyKey": "x"\n }\n ]\n }\'',
|
|
2535
|
+
'curl https://edge.api.stigg.io/api/v1/events \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "events": [\n {\n "customerId": "customerId",\n "eventName": "x",\n "idempotencyKey": "x"\n }\n ]\n }\'',
|
|
2535
2536
|
},
|
|
2536
2537
|
},
|
|
2537
2538
|
},
|
|
@@ -2585,7 +2586,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2585
2586
|
},
|
|
2586
2587
|
http: {
|
|
2587
2588
|
example:
|
|
2588
|
-
"curl https://api.stigg.io/api/v1/data-export/sync \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2589
|
+
"curl https://edge.api.stigg.io/api/v1/data-export/sync \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
2589
2590
|
},
|
|
2590
2591
|
},
|
|
2591
2592
|
},
|
|
@@ -2646,7 +2647,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2646
2647
|
},
|
|
2647
2648
|
http: {
|
|
2648
2649
|
example:
|
|
2649
|
-
'curl https://api.stigg.io/api/v1/data-export/scoped-token \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "applicationOrigin": "x"\n }\'',
|
|
2650
|
+
'curl https://edge.api.stigg.io/api/v1/data-export/scoped-token \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "applicationOrigin": "x"\n }\'',
|
|
2650
2651
|
},
|
|
2651
2652
|
},
|
|
2652
2653
|
},
|
|
@@ -2699,7 +2700,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2699
2700
|
'DataExportListModelsParams parameters = new();\n\nvar response = await client.V1.Events.DataExport.ListModels(parameters);\n\nConsole.WriteLine(response);',
|
|
2700
2701
|
},
|
|
2701
2702
|
http: {
|
|
2702
|
-
example:
|
|
2703
|
+
example:
|
|
2704
|
+
'curl https://edge.api.stigg.io/api/v1/data-export/models \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2703
2705
|
},
|
|
2704
2706
|
},
|
|
2705
2707
|
},
|
|
@@ -2761,7 +2763,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2761
2763
|
},
|
|
2762
2764
|
http: {
|
|
2763
2765
|
example:
|
|
2764
|
-
'curl https://api.stigg.io/api/v1/data-export/destinations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationId": "x",\n "destinationType": "x"\n }\'',
|
|
2766
|
+
'curl https://edge.api.stigg.io/api/v1/data-export/destinations \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "destinationId": "x",\n "destinationType": "x"\n }\'',
|
|
2765
2767
|
},
|
|
2766
2768
|
},
|
|
2767
2769
|
},
|
|
@@ -2816,7 +2818,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2816
2818
|
},
|
|
2817
2819
|
http: {
|
|
2818
2820
|
example:
|
|
2819
|
-
'curl https://api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2821
|
+
'curl https://edge.api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2820
2822
|
},
|
|
2821
2823
|
},
|
|
2822
2824
|
},
|
|
@@ -2878,7 +2880,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2878
2880
|
},
|
|
2879
2881
|
http: {
|
|
2880
2882
|
example:
|
|
2881
|
-
'curl https://api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "enabledModels": [\n "x"\n ],\n "integrationId": "x"\n }\'',
|
|
2883
|
+
'curl https://edge.api.stigg.io/api/v1/data-export/destinations/$DESTINATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "enabledModels": [\n "x"\n ],\n "integrationId": "x"\n }\'',
|
|
2882
2884
|
},
|
|
2883
2885
|
},
|
|
2884
2886
|
},
|
|
@@ -2907,9 +2909,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2907
2909
|
'X-ENVIRONMENT-ID?: string;',
|
|
2908
2910
|
],
|
|
2909
2911
|
response:
|
|
2910
|
-
'{ data: { cadence: string; currentUsage: number; entityId: string;
|
|
2912
|
+
'{ data: { cadence: string; currentUsage: number; entityId: string; entityTypeId: string; parentId: string; scopeEntityIds: string[]; usageLimit: number; usagePeriodEnd: string; usagePeriodStart: string; utilization: number; currencyId?: string; featureId?: string; }[]; pagination: { next: string; }; }',
|
|
2911
2913
|
markdown:
|
|
2912
|
-
"## retrieve_governance\n\n`client.v1.events.beta.customers.retrieveGovernance(id: string, after?: string, currencyIds?: string[], entityIdSearch?: string, entityTypeIds?: string[], featureIds?: string[], limit?: number, minUtilization?: number, order?: 'asc' | 'desc', scope?: 'all' | 'nodeWide' | 'scoped', sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; pagination: object; }`\n\n**get** `/api/v1-beta/customers/{id}/governance`\n\nQueries the customer's governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries `parentId` so the tree can be rebuilt client-side. Usage is read from a periodically-refreshed read model and never gates access.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `currencyIds?: string[]`\n Currency ids to include, repeated per value (e.g. `?currencyIds=credits`). Omit both featureIds and currencyIds for tree mode.\n\n- `entityIdSearch?: string`\n Case-insensitive substring match on the entity id (`%`/`_` matched literally).\n\n- `entityTypeIds?: string[]`\n Filter to one or more entity types, repeated per value (e.g. `?entityTypeIds=team&entityTypeIds=user`).\n\n- `featureIds?: string[]`\n Feature ids to include, repeated per value (e.g. `?featureIds=ai-tokens&featureIds=seats`). Omit both featureIds and currencyIds for tree mode — every node in the hierarchy with no usage configuration attached.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `minUtilization?: number`\n Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over limit).\n\n- `order?: 'asc' | 'desc'`\n Sort direction: `asc` or `desc` (default `desc`).\n\n- `scope?: 'all' | 'nodeWide' | 'scoped'`\n Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or `scoped` (non-empty only).\n\n- `sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt'`\n Sort key: `utilization` (default, cross-capability-safe), `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { cadence: string; currentUsage: number; entityId: string;
|
|
2914
|
+
"## retrieve_governance\n\n`client.v1.events.beta.customers.retrieveGovernance(id: string, after?: string, currencyIds?: string[], entityIdSearch?: string, entityTypeIds?: string[], featureIds?: string[], limit?: number, minUtilization?: number, order?: 'asc' | 'desc', scope?: 'all' | 'nodeWide' | 'scoped', sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt', X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; pagination: object; }`\n\n**get** `/api/v1-beta/customers/{id}/governance`\n\nQueries the customer's governance hierarchy tree, returning a cursor-paginated list of nodes with their usage configuration (limit, cadence, scope) and current usage, sortable and filterable by usage. Each node carries `parentId` so the tree can be rebuilt client-side. Usage is read from a periodically-refreshed read model and never gates access.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `currencyIds?: string[]`\n Currency ids to include, repeated per value (e.g. `?currencyIds=credits`). Omit both featureIds and currencyIds for tree mode.\n\n- `entityIdSearch?: string`\n Case-insensitive substring match on the entity id (`%`/`_` matched literally).\n\n- `entityTypeIds?: string[]`\n Filter to one or more entity types, repeated per value (e.g. `?entityTypeIds=team&entityTypeIds=user`).\n\n- `featureIds?: string[]`\n Feature ids to include, repeated per value (e.g. `?featureIds=ai-tokens&featureIds=seats`). Omit both featureIds and currencyIds for tree mode — every node in the hierarchy with no usage configuration attached.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `minUtilization?: number`\n Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over limit).\n\n- `order?: 'asc' | 'desc'`\n Sort direction: `asc` or `desc` (default `desc`).\n\n- `scope?: 'all' | 'nodeWide' | 'scoped'`\n Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or `scoped` (non-empty only).\n\n- `sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt'`\n Sort key: `utilization` (default, cross-capability-safe), `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { cadence: string; currentUsage: number; entityId: string; entityTypeId: string; parentId: string; scopeEntityIds: string[]; usageLimit: number; usagePeriodEnd: string; usagePeriodStart: string; utilization: number; currencyId?: string; featureId?: string; }[]; pagination: { next: string; }; }`\n Paginated list of governance tree nodes, each with its usage configuration and current usage.\n\n - `data: { cadence: string; currentUsage: number; entityId: string; entityTypeId: string; parentId: string; scopeEntityIds: string[]; usageLimit: number; usagePeriodEnd: string; usagePeriodStart: string; utilization: number; currencyId?: string; featureId?: string; }[]`\n - `pagination: { next: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.events.beta.customers.retrieveGovernance('id');\n\nconsole.log(response);\n```",
|
|
2913
2915
|
perLanguage: {
|
|
2914
2916
|
typescript: {
|
|
2915
2917
|
method: 'client.v1.events.beta.customers.retrieveGovernance',
|
|
@@ -2948,7 +2950,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2948
2950
|
},
|
|
2949
2951
|
http: {
|
|
2950
2952
|
example:
|
|
2951
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/governance \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2953
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/governance \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
2952
2954
|
},
|
|
2953
2955
|
},
|
|
2954
2956
|
},
|
|
@@ -3015,7 +3017,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3015
3017
|
'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
3016
3018
|
},
|
|
3017
3019
|
http: {
|
|
3018
|
-
example: 'curl https://api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3020
|
+
example: 'curl https://edge.api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3019
3021
|
},
|
|
3020
3022
|
},
|
|
3021
3023
|
},
|
|
@@ -3076,7 +3078,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3076
3078
|
},
|
|
3077
3079
|
http: {
|
|
3078
3080
|
example:
|
|
3079
|
-
'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3081
|
+
'curl https://edge.api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3080
3082
|
},
|
|
3081
3083
|
},
|
|
3082
3084
|
},
|
|
@@ -3138,7 +3140,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3138
3140
|
'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.ListLedger(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3139
3141
|
},
|
|
3140
3142
|
http: {
|
|
3141
|
-
example:
|
|
3143
|
+
example:
|
|
3144
|
+
'curl https://edge.api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3142
3145
|
},
|
|
3143
3146
|
},
|
|
3144
3147
|
},
|
|
@@ -3201,7 +3204,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3201
3204
|
'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.Grants.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3202
3205
|
},
|
|
3203
3206
|
http: {
|
|
3204
|
-
example:
|
|
3207
|
+
example:
|
|
3208
|
+
'curl https://edge.api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3205
3209
|
},
|
|
3206
3210
|
},
|
|
3207
3211
|
},
|
|
@@ -3275,7 +3279,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3275
3279
|
},
|
|
3276
3280
|
http: {
|
|
3277
3281
|
example:
|
|
3278
|
-
'curl https://api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
3282
|
+
'curl https://edge.api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
3279
3283
|
},
|
|
3280
3284
|
},
|
|
3281
3285
|
},
|
|
@@ -3329,7 +3333,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3329
3333
|
},
|
|
3330
3334
|
http: {
|
|
3331
3335
|
example:
|
|
3332
|
-
'curl https://api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3336
|
+
'curl https://edge.api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3333
3337
|
},
|
|
3334
3338
|
},
|
|
3335
3339
|
},
|
|
@@ -3391,7 +3395,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3391
3395
|
},
|
|
3392
3396
|
http: {
|
|
3393
3397
|
example:
|
|
3394
|
-
'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3398
|
+
'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3395
3399
|
},
|
|
3396
3400
|
},
|
|
3397
3401
|
},
|
|
@@ -3455,7 +3459,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3455
3459
|
},
|
|
3456
3460
|
http: {
|
|
3457
3461
|
example:
|
|
3458
|
-
'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
3462
|
+
'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
3459
3463
|
},
|
|
3460
3464
|
},
|
|
3461
3465
|
},
|
|
@@ -3519,7 +3523,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3519
3523
|
},
|
|
3520
3524
|
http: {
|
|
3521
3525
|
example:
|
|
3522
|
-
"curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3526
|
+
"curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3523
3527
|
},
|
|
3524
3528
|
},
|
|
3525
3529
|
},
|
|
@@ -3575,7 +3579,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3575
3579
|
},
|
|
3576
3580
|
http: {
|
|
3577
3581
|
example:
|
|
3578
|
-
'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3582
|
+
'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3579
3583
|
},
|
|
3580
3584
|
},
|
|
3581
3585
|
},
|
|
@@ -3631,7 +3635,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3631
3635
|
},
|
|
3632
3636
|
http: {
|
|
3633
3637
|
example:
|
|
3634
|
-
'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3638
|
+
'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3635
3639
|
},
|
|
3636
3640
|
},
|
|
3637
3641
|
},
|
|
@@ -3686,7 +3690,132 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3686
3690
|
},
|
|
3687
3691
|
http: {
|
|
3688
3692
|
example:
|
|
3689
|
-
'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3693
|
+
'curl https://edge.api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3694
|
+
},
|
|
3695
|
+
},
|
|
3696
|
+
},
|
|
3697
|
+
{
|
|
3698
|
+
name: 'consume',
|
|
3699
|
+
endpoint: '/api/v1/credits/consumption',
|
|
3700
|
+
httpMethod: 'post',
|
|
3701
|
+
summary: 'Consume credits',
|
|
3702
|
+
description:
|
|
3703
|
+
'Consumes a specified amount of credits directly from a customer wallet, with no feature mapping. Returns the optimistic balance.',
|
|
3704
|
+
stainlessPath: '(resource) v1.credits.consumption > (method) consume',
|
|
3705
|
+
qualified: 'client.v1.credits.consumption.consume',
|
|
3706
|
+
params: [
|
|
3707
|
+
'amount: number;',
|
|
3708
|
+
'currencyId: string;',
|
|
3709
|
+
'customerId: string;',
|
|
3710
|
+
'idempotencyKey: string;',
|
|
3711
|
+
'createdAt?: string;',
|
|
3712
|
+
'dimensions?: object;',
|
|
3713
|
+
'resourceId?: string;',
|
|
3714
|
+
'X-ACCOUNT-ID?: string;',
|
|
3715
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3716
|
+
],
|
|
3717
|
+
response:
|
|
3718
|
+
'{ data: { amount: number; currencyId: string; customerId: string; timestamp: string; credit?: { currencyId: string; currentUsage: number; timestamp: string; usageLimit: number; usagePeriodEnd?: string; }; resourceId?: string; }; }',
|
|
3719
|
+
markdown:
|
|
3720
|
+
"## consume\n\n`client.v1.credits.consumption.consume(amount: number, currencyId: string, customerId: string, idempotencyKey: string, createdAt?: string, dimensions?: object, resourceId?: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/consumption`\n\nConsumes a specified amount of credits directly from a customer wallet, with no feature mapping. Returns the optimistic balance.\n\n### Parameters\n\n- `amount: number`\n The amount of credits to consume\n\n- `currencyId: string`\n The credit currency to consume from (required)\n\n- `customerId: string`\n The customer to consume credits from (required)\n\n- `idempotencyKey: string`\n A unique key used to deduplicate the consumption (required)\n\n- `createdAt?: string`\n Optional timestamp the consumption is attributed to\n\n- `dimensions?: object`\n Optional dimensions describing the consumption\n\n- `resourceId?: string`\n Optional resource the consumption is attributed to\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { amount: number; currencyId: string; customerId: string; timestamp: string; credit?: { currencyId: string; currentUsage: number; timestamp: string; usageLimit: number; usagePeriodEnd?: string; }; resourceId?: string; }; }`\n Response object\n\n - `data: { amount: number; currencyId: string; customerId: string; timestamp: string; credit?: { currencyId: string; currentUsage: number; timestamp: string; usageLimit: number; usagePeriodEnd?: string; }; resourceId?: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.consumption.consume({\n amount: 1,\n currencyId: 'currencyId',\n customerId: 'customerId',\n idempotencyKey: 'x',\n});\n\nconsole.log(response);\n```",
|
|
3721
|
+
perLanguage: {
|
|
3722
|
+
typescript: {
|
|
3723
|
+
method: 'client.v1.credits.consumption.consume',
|
|
3724
|
+
example:
|
|
3725
|
+
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.consumption.consume({\n amount: 1,\n currencyId: 'currencyId',\n customerId: 'customerId',\n idempotencyKey: 'x',\n});\n\nconsole.log(response.data);",
|
|
3726
|
+
},
|
|
3727
|
+
python: {
|
|
3728
|
+
method: 'v1.credits.consumption.consume',
|
|
3729
|
+
example:
|
|
3730
|
+
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.consumption.consume(\n amount=1,\n currency_id="currencyId",\n customer_id="customerId",\n idempotency_key="x",\n)\nprint(response.data)',
|
|
3731
|
+
},
|
|
3732
|
+
java: {
|
|
3733
|
+
method: 'v1().credits().consumption().consume',
|
|
3734
|
+
example:
|
|
3735
|
+
'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.consumption.ConsumptionConsumeParams;\nimport io.stigg.models.v1.credits.consumption.ConsumptionConsumeResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n ConsumptionConsumeParams params = ConsumptionConsumeParams.builder()\n .amount(1.0)\n .currencyId("currencyId")\n .customerId("customerId")\n .idempotencyKey("x")\n .build();\n ConsumptionConsumeResponse response = client.v1().credits().consumption().consume(params);\n }\n}',
|
|
3736
|
+
},
|
|
3737
|
+
go: {
|
|
3738
|
+
method: 'client.V1.Credits.Consumption.Consume',
|
|
3739
|
+
example:
|
|
3740
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.Consumption.Consume(context.TODO(), stigg.V1CreditConsumptionConsumeParams{\n\t\tAmount: 1,\n\t\tCurrencyID: "currencyId",\n\t\tCustomerID: "customerId",\n\t\tIdempotencyKey: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
3741
|
+
},
|
|
3742
|
+
ruby: {
|
|
3743
|
+
method: 'v1.credits.consumption.consume',
|
|
3744
|
+
example:
|
|
3745
|
+
'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.consumption.consume(\n amount: 1,\n currency_id: "currencyId",\n customer_id: "customerId",\n idempotency_key: "x"\n)\n\nputs(response)',
|
|
3746
|
+
},
|
|
3747
|
+
cli: {
|
|
3748
|
+
method: 'consumption consume',
|
|
3749
|
+
example:
|
|
3750
|
+
"stigg v1:credits:consumption consume \\\n --api-key 'My API Key' \\\n --amount 1 \\\n --currency-id currencyId \\\n --customer-id customerId \\\n --idempotency-key x",
|
|
3751
|
+
},
|
|
3752
|
+
csharp: {
|
|
3753
|
+
method: 'V1.Credits.Consumption.Consume',
|
|
3754
|
+
example:
|
|
3755
|
+
'ConsumptionConsumeParams parameters = new()\n{\n Amount = 1,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n IdempotencyKey = "x",\n};\n\nvar response = await client.V1.Credits.Consumption.Consume(parameters);\n\nConsole.WriteLine(response);',
|
|
3756
|
+
},
|
|
3757
|
+
http: {
|
|
3758
|
+
example:
|
|
3759
|
+
'curl https://edge.api.stigg.io/api/v1/credits/consumption \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 1,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "idempotencyKey": "x"\n }\'',
|
|
3760
|
+
},
|
|
3761
|
+
},
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
name: 'consume_async',
|
|
3765
|
+
endpoint: '/api/v1/credits/consumption/async',
|
|
3766
|
+
httpMethod: 'post',
|
|
3767
|
+
summary: 'Consume credits asynchronously',
|
|
3768
|
+
description:
|
|
3769
|
+
'Consumes credits directly from customer wallets asynchronously. Consumptions are reconciled asynchronously into the credit balances.',
|
|
3770
|
+
stainlessPath: '(resource) v1.credits.consumption > (method) consume_async',
|
|
3771
|
+
qualified: 'client.v1.credits.consumption.consumeAsync',
|
|
3772
|
+
params: [
|
|
3773
|
+
'consumptions: { amount: number; currencyId: string; customerId: string; idempotencyKey: string; createdAt?: string; dimensions?: object; resourceId?: string; }[];',
|
|
3774
|
+
'X-ACCOUNT-ID?: string;',
|
|
3775
|
+
'X-ENVIRONMENT-ID?: string;',
|
|
3776
|
+
],
|
|
3777
|
+
response: '{ data: object; }',
|
|
3778
|
+
markdown:
|
|
3779
|
+
"## consume_async\n\n`client.v1.credits.consumption.consumeAsync(consumptions: { amount: number; currencyId: string; customerId: string; idempotencyKey: string; createdAt?: string; dimensions?: object; resourceId?: string; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**post** `/api/v1/credits/consumption/async`\n\nConsumes credits directly from customer wallets asynchronously. Consumptions are reconciled asynchronously into the credit balances.\n\n### Parameters\n\n- `consumptions: { amount: number; currencyId: string; customerId: string; idempotencyKey: string; createdAt?: string; dimensions?: object; resourceId?: string; }[]`\n The credit consumptions to report (up to 1000)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: object; }`\n Response object\n\n - `data: object`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.consumption.consumeAsync({ consumptions: [{\n amount: 1,\n currencyId: 'currencyId',\n customerId: 'customerId',\n idempotencyKey: 'x',\n}] });\n\nconsole.log(response);\n```",
|
|
3780
|
+
perLanguage: {
|
|
3781
|
+
typescript: {
|
|
3782
|
+
method: 'client.v1.credits.consumption.consumeAsync',
|
|
3783
|
+
example:
|
|
3784
|
+
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.consumption.consumeAsync({\n consumptions: [\n {\n amount: 1,\n currencyId: 'currencyId',\n customerId: 'customerId',\n idempotencyKey: 'x',\n },\n ],\n});\n\nconsole.log(response.data);",
|
|
3785
|
+
},
|
|
3786
|
+
python: {
|
|
3787
|
+
method: 'v1.credits.consumption.consume_async',
|
|
3788
|
+
example:
|
|
3789
|
+
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.consumption.consume_async(\n consumptions=[{\n "amount": 1,\n "currency_id": "currencyId",\n "customer_id": "customerId",\n "idempotency_key": "x",\n }],\n)\nprint(response.data)',
|
|
3790
|
+
},
|
|
3791
|
+
java: {
|
|
3792
|
+
method: 'v1().credits().consumption().consumeAsync',
|
|
3793
|
+
example:
|
|
3794
|
+
'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.consumption.ConsumptionConsumeAsyncParams;\nimport io.stigg.models.v1.credits.consumption.ConsumptionConsumeAsyncResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n ConsumptionConsumeAsyncParams params = ConsumptionConsumeAsyncParams.builder()\n .addConsumption(ConsumptionConsumeAsyncParams.Consumption.builder()\n .amount(1.0)\n .currencyId("currencyId")\n .customerId("customerId")\n .idempotencyKey("x")\n .build())\n .build();\n ConsumptionConsumeAsyncResponse response = client.v1().credits().consumption().consumeAsync(params);\n }\n}',
|
|
3795
|
+
},
|
|
3796
|
+
go: {
|
|
3797
|
+
method: 'client.V1.Credits.Consumption.ConsumeAsync',
|
|
3798
|
+
example:
|
|
3799
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.Consumption.ConsumeAsync(context.TODO(), stigg.V1CreditConsumptionConsumeAsyncParams{\n\t\tConsumptions: []stigg.V1CreditConsumptionConsumeAsyncParamsConsumption{{\n\t\t\tAmount: 1,\n\t\t\tCurrencyID: "currencyId",\n\t\t\tCustomerID: "customerId",\n\t\t\tIdempotencyKey: "x",\n\t\t}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
3800
|
+
},
|
|
3801
|
+
ruby: {
|
|
3802
|
+
method: 'v1.credits.consumption.consume_async',
|
|
3803
|
+
example:
|
|
3804
|
+
'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.consumption.consume_async(\n consumptions: [{amount: 1, currencyId: "currencyId", customerId: "customerId", idempotencyKey: "x"}]\n)\n\nputs(response)',
|
|
3805
|
+
},
|
|
3806
|
+
cli: {
|
|
3807
|
+
method: 'consumption consume_async',
|
|
3808
|
+
example:
|
|
3809
|
+
"stigg v1:credits:consumption consume-async \\\n --api-key 'My API Key' \\\n --consumption '{amount: 1, currencyId: currencyId, customerId: customerId, idempotencyKey: x}'",
|
|
3810
|
+
},
|
|
3811
|
+
csharp: {
|
|
3812
|
+
method: 'V1.Credits.Consumption.ConsumeAsync',
|
|
3813
|
+
example:
|
|
3814
|
+
'ConsumptionConsumeAsyncParams parameters = new()\n{\n Consumptions =\n [\n new()\n {\n Amount = 1,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n IdempotencyKey = "x",\n CreatedAt = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n Dimensions = new Dictionary<string, Dimension>()\n {\n { "foo", "string" }\n },\n ResourceID = "resourceId",\n },\n ],\n};\n\nvar response = await client.V1.Credits.Consumption.ConsumeAsync(parameters);\n\nConsole.WriteLine(response);',
|
|
3815
|
+
},
|
|
3816
|
+
http: {
|
|
3817
|
+
example:
|
|
3818
|
+
'curl https://edge.api.stigg.io/api/v1/credits/consumption/async \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "consumptions": [\n {\n "amount": 1,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "idempotencyKey": "x"\n }\n ]\n }\'',
|
|
3690
3819
|
},
|
|
3691
3820
|
},
|
|
3692
3821
|
},
|
|
@@ -3739,7 +3868,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3739
3868
|
'FeatureRetrieveFeatureParams parameters = new() { ID = "x" };\n\nvar feature = await client.V1.Features.RetrieveFeature(parameters);\n\nConsole.WriteLine(feature);',
|
|
3740
3869
|
},
|
|
3741
3870
|
http: {
|
|
3742
|
-
example: 'curl https://api.stigg.io/api/v1/features/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3871
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3743
3872
|
},
|
|
3744
3873
|
},
|
|
3745
3874
|
},
|
|
@@ -3806,7 +3935,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3806
3935
|
},
|
|
3807
3936
|
http: {
|
|
3808
3937
|
example:
|
|
3809
|
-
"curl https://api.stigg.io/api/v1/features/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3938
|
+
"curl https://edge.api.stigg.io/api/v1/features/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
3810
3939
|
},
|
|
3811
3940
|
},
|
|
3812
3941
|
},
|
|
@@ -3875,7 +4004,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3875
4004
|
},
|
|
3876
4005
|
http: {
|
|
3877
4006
|
example:
|
|
3878
|
-
'curl https://api.stigg.io/api/v1/features \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "featureType": "BOOLEAN"\n }\'',
|
|
4007
|
+
'curl https://edge.api.stigg.io/api/v1/features \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "featureType": "BOOLEAN"\n }\'',
|
|
3879
4008
|
},
|
|
3880
4009
|
},
|
|
3881
4010
|
},
|
|
@@ -3939,7 +4068,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3939
4068
|
'FeatureListFeaturesParams parameters = new();\n\nvar page = await client.V1.Features.ListFeatures(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3940
4069
|
},
|
|
3941
4070
|
http: {
|
|
3942
|
-
example: 'curl https://api.stigg.io/api/v1/features \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4071
|
+
example: 'curl https://edge.api.stigg.io/api/v1/features \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3943
4072
|
},
|
|
3944
4073
|
},
|
|
3945
4074
|
},
|
|
@@ -3993,7 +4122,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3993
4122
|
},
|
|
3994
4123
|
http: {
|
|
3995
4124
|
example:
|
|
3996
|
-
'curl https://api.stigg.io/api/v1/features/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4125
|
+
'curl https://edge.api.stigg.io/api/v1/features/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3997
4126
|
},
|
|
3998
4127
|
},
|
|
3999
4128
|
},
|
|
@@ -4047,7 +4176,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4047
4176
|
},
|
|
4048
4177
|
http: {
|
|
4049
4178
|
example:
|
|
4050
|
-
'curl https://api.stigg.io/api/v1/features/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4179
|
+
'curl https://edge.api.stigg.io/api/v1/features/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4051
4180
|
},
|
|
4052
4181
|
},
|
|
4053
4182
|
},
|
|
@@ -4109,7 +4238,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4109
4238
|
'AddonListParams parameters = new();\n\nvar page = await client.V1.Addons.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4110
4239
|
},
|
|
4111
4240
|
http: {
|
|
4112
|
-
example: 'curl https://api.stigg.io/api/v1/addons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4241
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4113
4242
|
},
|
|
4114
4243
|
},
|
|
4115
4244
|
},
|
|
@@ -4176,7 +4305,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4176
4305
|
},
|
|
4177
4306
|
http: {
|
|
4178
4307
|
example:
|
|
4179
|
-
'curl https://api.stigg.io/api/v1/addons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
4308
|
+
'curl https://edge.api.stigg.io/api/v1/addons \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
4180
4309
|
},
|
|
4181
4310
|
},
|
|
4182
4311
|
},
|
|
@@ -4229,7 +4358,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4229
4358
|
'AddonRetrieveParams parameters = new() { ID = "x" };\n\nvar addon = await client.V1.Addons.Retrieve(parameters);\n\nConsole.WriteLine(addon);',
|
|
4230
4359
|
},
|
|
4231
4360
|
http: {
|
|
4232
|
-
example: 'curl https://api.stigg.io/api/v1/addons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4361
|
+
example: 'curl https://edge.api.stigg.io/api/v1/addons/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4233
4362
|
},
|
|
4234
4363
|
},
|
|
4235
4364
|
},
|
|
@@ -4295,7 +4424,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4295
4424
|
},
|
|
4296
4425
|
http: {
|
|
4297
4426
|
example:
|
|
4298
|
-
"curl https://api.stigg.io/api/v1/addons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
4427
|
+
"curl https://edge.api.stigg.io/api/v1/addons/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
4299
4428
|
},
|
|
4300
4429
|
},
|
|
4301
4430
|
},
|
|
@@ -4349,7 +4478,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4349
4478
|
},
|
|
4350
4479
|
http: {
|
|
4351
4480
|
example:
|
|
4352
|
-
'curl https://api.stigg.io/api/v1/addons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4481
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4353
4482
|
},
|
|
4354
4483
|
},
|
|
4355
4484
|
},
|
|
@@ -4408,7 +4537,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4408
4537
|
},
|
|
4409
4538
|
http: {
|
|
4410
4539
|
example:
|
|
4411
|
-
'curl https://api.stigg.io/api/v1/addons/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
4540
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
4412
4541
|
},
|
|
4413
4542
|
},
|
|
4414
4543
|
},
|
|
@@ -4462,7 +4591,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4462
4591
|
},
|
|
4463
4592
|
http: {
|
|
4464
4593
|
example:
|
|
4465
|
-
'curl https://api.stigg.io/api/v1/addons/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4594
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4466
4595
|
},
|
|
4467
4596
|
},
|
|
4468
4597
|
},
|
|
@@ -4515,7 +4644,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4515
4644
|
},
|
|
4516
4645
|
http: {
|
|
4517
4646
|
example:
|
|
4518
|
-
'curl https://api.stigg.io/api/v1/addons/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4647
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4519
4648
|
},
|
|
4520
4649
|
},
|
|
4521
4650
|
},
|
|
@@ -4575,7 +4704,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4575
4704
|
'AddonListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Addons.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4576
4705
|
},
|
|
4577
4706
|
http: {
|
|
4578
|
-
example:
|
|
4707
|
+
example:
|
|
4708
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4579
4709
|
},
|
|
4580
4710
|
},
|
|
4581
4711
|
},
|
|
@@ -4629,7 +4759,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4629
4759
|
},
|
|
4630
4760
|
http: {
|
|
4631
4761
|
example:
|
|
4632
|
-
'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4762
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4633
4763
|
},
|
|
4634
4764
|
},
|
|
4635
4765
|
},
|
|
@@ -4689,7 +4819,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4689
4819
|
},
|
|
4690
4820
|
http: {
|
|
4691
4821
|
example:
|
|
4692
|
-
'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
4822
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
4693
4823
|
},
|
|
4694
4824
|
},
|
|
4695
4825
|
},
|
|
@@ -4748,7 +4878,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4748
4878
|
},
|
|
4749
4879
|
http: {
|
|
4750
4880
|
example:
|
|
4751
|
-
'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
4881
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
4752
4882
|
},
|
|
4753
4883
|
},
|
|
4754
4884
|
},
|
|
@@ -4803,7 +4933,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4803
4933
|
},
|
|
4804
4934
|
http: {
|
|
4805
4935
|
example:
|
|
4806
|
-
'curl https://api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4936
|
+
'curl https://edge.api.stigg.io/api/v1/addons/$ADDON_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4807
4937
|
},
|
|
4808
4938
|
},
|
|
4809
4939
|
},
|
|
@@ -4871,7 +5001,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4871
5001
|
},
|
|
4872
5002
|
http: {
|
|
4873
5003
|
example:
|
|
4874
|
-
'curl https://api.stigg.io/api/v1/plans \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
5004
|
+
'curl https://edge.api.stigg.io/api/v1/plans \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName",\n "productId": "productId"\n }\'',
|
|
4875
5005
|
},
|
|
4876
5006
|
},
|
|
4877
5007
|
},
|
|
@@ -4933,7 +5063,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4933
5063
|
'PlanListParams parameters = new();\n\nvar page = await client.V1.Plans.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4934
5064
|
},
|
|
4935
5065
|
http: {
|
|
4936
|
-
example: 'curl https://api.stigg.io/api/v1/plans \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5066
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4937
5067
|
},
|
|
4938
5068
|
},
|
|
4939
5069
|
},
|
|
@@ -4986,7 +5116,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4986
5116
|
'PlanRetrieveParams parameters = new() { ID = "x" };\n\nvar plan = await client.V1.Plans.Retrieve(parameters);\n\nConsole.WriteLine(plan);',
|
|
4987
5117
|
},
|
|
4988
5118
|
http: {
|
|
4989
|
-
example: 'curl https://api.stigg.io/api/v1/plans/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5119
|
+
example: 'curl https://edge.api.stigg.io/api/v1/plans/$ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4990
5120
|
},
|
|
4991
5121
|
},
|
|
4992
5122
|
},
|
|
@@ -5052,7 +5182,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5052
5182
|
},
|
|
5053
5183
|
http: {
|
|
5054
5184
|
example:
|
|
5055
|
-
"curl https://api.stigg.io/api/v1/plans/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
5185
|
+
"curl https://edge.api.stigg.io/api/v1/plans/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
5056
5186
|
},
|
|
5057
5187
|
},
|
|
5058
5188
|
},
|
|
@@ -5106,7 +5236,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5106
5236
|
},
|
|
5107
5237
|
http: {
|
|
5108
5238
|
example:
|
|
5109
|
-
'curl https://api.stigg.io/api/v1/plans/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5239
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5110
5240
|
},
|
|
5111
5241
|
},
|
|
5112
5242
|
},
|
|
@@ -5165,7 +5295,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5165
5295
|
},
|
|
5166
5296
|
http: {
|
|
5167
5297
|
example:
|
|
5168
|
-
'curl https://api.stigg.io/api/v1/plans/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
5298
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$ID/publish \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "migrationType": "NEW_CUSTOMERS"\n }\'',
|
|
5169
5299
|
},
|
|
5170
5300
|
},
|
|
5171
5301
|
},
|
|
@@ -5219,7 +5349,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5219
5349
|
},
|
|
5220
5350
|
http: {
|
|
5221
5351
|
example:
|
|
5222
|
-
'curl https://api.stigg.io/api/v1/plans/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5352
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$ID/draft \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5223
5353
|
},
|
|
5224
5354
|
},
|
|
5225
5355
|
},
|
|
@@ -5272,7 +5402,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5272
5402
|
},
|
|
5273
5403
|
http: {
|
|
5274
5404
|
example:
|
|
5275
|
-
'curl https://api.stigg.io/api/v1/plans/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5405
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$ID/draft \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5276
5406
|
},
|
|
5277
5407
|
},
|
|
5278
5408
|
},
|
|
@@ -5332,7 +5462,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5332
5462
|
'PlanListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5333
5463
|
},
|
|
5334
5464
|
http: {
|
|
5335
|
-
example:
|
|
5465
|
+
example:
|
|
5466
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5336
5467
|
},
|
|
5337
5468
|
},
|
|
5338
5469
|
},
|
|
@@ -5393,7 +5524,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5393
5524
|
},
|
|
5394
5525
|
http: {
|
|
5395
5526
|
example:
|
|
5396
|
-
'curl https://api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5527
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5397
5528
|
},
|
|
5398
5529
|
},
|
|
5399
5530
|
},
|
|
@@ -5447,7 +5578,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5447
5578
|
},
|
|
5448
5579
|
http: {
|
|
5449
5580
|
example:
|
|
5450
|
-
'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5581
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5451
5582
|
},
|
|
5452
5583
|
},
|
|
5453
5584
|
},
|
|
@@ -5507,7 +5638,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5507
5638
|
},
|
|
5508
5639
|
http: {
|
|
5509
5640
|
example:
|
|
5510
|
-
'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
5641
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entitlements": [\n {\n "id": "id",\n "type": "FEATURE"\n }\n ]\n }\'',
|
|
5511
5642
|
},
|
|
5512
5643
|
},
|
|
5513
5644
|
},
|
|
@@ -5566,7 +5697,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5566
5697
|
},
|
|
5567
5698
|
http: {
|
|
5568
5699
|
example:
|
|
5569
|
-
'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
5700
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "type": "FEATURE"\n }\'',
|
|
5570
5701
|
},
|
|
5571
5702
|
},
|
|
5572
5703
|
},
|
|
@@ -5621,7 +5752,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5621
5752
|
},
|
|
5622
5753
|
http: {
|
|
5623
5754
|
example:
|
|
5624
|
-
'curl https://api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5755
|
+
'curl https://edge.api.stigg.io/api/v1/plans/$PLAN_ID/entitlements/$ID \\\n -X DELETE \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5625
5756
|
},
|
|
5626
5757
|
},
|
|
5627
5758
|
},
|
|
@@ -5681,7 +5812,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5681
5812
|
},
|
|
5682
5813
|
http: {
|
|
5683
5814
|
example:
|
|
5684
|
-
'curl https://api.stigg.io/api/v1/usage \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "usages": [\n {\n "customerId": "customerId",\n "featureId": "featureId",\n "value": -9007199254740991\n }\n ]\n }\'',
|
|
5815
|
+
'curl https://edge.api.stigg.io/api/v1/usage \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "usages": [\n {\n "customerId": "customerId",\n "featureId": "featureId",\n "value": -9007199254740991\n }\n ]\n }\'',
|
|
5685
5816
|
},
|
|
5686
5817
|
},
|
|
5687
5818
|
},
|
|
@@ -5745,7 +5876,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5745
5876
|
},
|
|
5746
5877
|
http: {
|
|
5747
5878
|
example:
|
|
5748
|
-
'curl https://api.stigg.io/api/v1/usage/$CUSTOMER_ID/history/$FEATURE_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5879
|
+
'curl https://edge.api.stigg.io/api/v1/usage/$CUSTOMER_ID/history/$FEATURE_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5749
5880
|
},
|
|
5750
5881
|
},
|
|
5751
5882
|
},
|
|
@@ -5807,7 +5938,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5807
5938
|
'ProductListProductsParams parameters = new();\n\nvar page = await client.V1.Products.ListProducts(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5808
5939
|
},
|
|
5809
5940
|
http: {
|
|
5810
|
-
example: 'curl https://api.stigg.io/api/v1/products \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5941
|
+
example: 'curl https://edge.api.stigg.io/api/v1/products \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5811
5942
|
},
|
|
5812
5943
|
},
|
|
5813
5944
|
},
|
|
@@ -5870,7 +6001,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5870
6001
|
},
|
|
5871
6002
|
http: {
|
|
5872
6003
|
example:
|
|
5873
|
-
'curl https://api.stigg.io/api/v1/products \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
6004
|
+
'curl https://edge.api.stigg.io/api/v1/products \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
5874
6005
|
},
|
|
5875
6006
|
},
|
|
5876
6007
|
},
|
|
@@ -5934,7 +6065,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5934
6065
|
},
|
|
5935
6066
|
http: {
|
|
5936
6067
|
example:
|
|
5937
|
-
"curl https://api.stigg.io/api/v1/products/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
6068
|
+
"curl https://edge.api.stigg.io/api/v1/products/$ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
5938
6069
|
},
|
|
5939
6070
|
},
|
|
5940
6071
|
},
|
|
@@ -5988,7 +6119,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5988
6119
|
},
|
|
5989
6120
|
http: {
|
|
5990
6121
|
example:
|
|
5991
|
-
'curl https://api.stigg.io/api/v1/products/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6122
|
+
'curl https://edge.api.stigg.io/api/v1/products/$ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5992
6123
|
},
|
|
5993
6124
|
},
|
|
5994
6125
|
},
|
|
@@ -6042,7 +6173,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6042
6173
|
},
|
|
6043
6174
|
http: {
|
|
6044
6175
|
example:
|
|
6045
|
-
'curl https://api.stigg.io/api/v1/products/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6176
|
+
'curl https://edge.api.stigg.io/api/v1/products/$ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6046
6177
|
},
|
|
6047
6178
|
},
|
|
6048
6179
|
},
|
|
@@ -6104,7 +6235,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6104
6235
|
},
|
|
6105
6236
|
http: {
|
|
6106
6237
|
example:
|
|
6107
|
-
'curl https://api.stigg.io/api/v1/products/$ID/duplicate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetId": "targetId"\n }\'',
|
|
6238
|
+
'curl https://edge.api.stigg.io/api/v1/products/$ID/duplicate \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "targetId": "targetId"\n }\'',
|
|
6108
6239
|
},
|
|
6109
6240
|
},
|
|
6110
6241
|
},
|
|
@@ -6169,7 +6300,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6169
6300
|
},
|
|
6170
6301
|
http: {
|
|
6171
6302
|
example:
|
|
6172
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6303
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6173
6304
|
},
|
|
6174
6305
|
},
|
|
6175
6306
|
},
|
|
@@ -6185,16 +6316,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6185
6316
|
'id: string;',
|
|
6186
6317
|
'after?: string;',
|
|
6187
6318
|
'before?: string;',
|
|
6319
|
+
'entityTypeId?: string;',
|
|
6188
6320
|
"includeArchived?: 'true' | 'false';",
|
|
6189
6321
|
'limit?: number;',
|
|
6190
|
-
'typeRefId?: string;',
|
|
6191
6322
|
'X-ACCOUNT-ID?: string;',
|
|
6192
6323
|
'X-ENVIRONMENT-ID?: string;',
|
|
6193
6324
|
],
|
|
6194
6325
|
response:
|
|
6195
|
-
'{ id: string; archivedAt: string; createdAt: string;
|
|
6326
|
+
'{ id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }',
|
|
6196
6327
|
markdown:
|
|
6197
|
-
"## list\n\n`client.v1Beta.customers.entities.list(id: string, after?: string, before?: string, includeArchived?: 'true' | 'false', limit?: number,
|
|
6328
|
+
"## list\n\n`client.v1Beta.customers.entities.list(id: string, after?: string, before?: string, entityTypeId?: string, includeArchived?: 'true' | 'false', limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }`\n\n**get** `/api/v1-beta/customers/{id}/entities`\n\nRetrieves a paginated list of entities for the given customer.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `entityTypeId?: string`\n Filter results to entities of a specific entity type, by the type's ID\n\n- `includeArchived?: 'true' | 'false'`\n Whether to include archived entities. One of: true, false\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }`\n A stored entity instance tracked by the governance service for a given customer\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `entityTypeId: string`\n - `metadata: object`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const entityListResponse of client.v1Beta.customers.entities.list('id')) {\n console.log(entityListResponse);\n}\n```",
|
|
6198
6329
|
perLanguage: {
|
|
6199
6330
|
typescript: {
|
|
6200
6331
|
method: 'client.v1Beta.customers.entities.list',
|
|
@@ -6232,7 +6363,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6232
6363
|
},
|
|
6233
6364
|
http: {
|
|
6234
6365
|
example:
|
|
6235
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6366
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6236
6367
|
},
|
|
6237
6368
|
},
|
|
6238
6369
|
},
|
|
@@ -6247,24 +6378,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6247
6378
|
qualified: 'client.v1Beta.customers.entities.upsert',
|
|
6248
6379
|
params: [
|
|
6249
6380
|
'id: string;',
|
|
6250
|
-
'entities: { id: string;
|
|
6381
|
+
'entities: { id: string; entityTypeId?: string; metadata?: object; }[];',
|
|
6251
6382
|
'X-ACCOUNT-ID?: string;',
|
|
6252
6383
|
'X-ENVIRONMENT-ID?: string;',
|
|
6253
6384
|
],
|
|
6254
6385
|
response:
|
|
6255
|
-
'{ data: { id: string; archivedAt: string; createdAt: string;
|
|
6386
|
+
'{ data: { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }[]; }',
|
|
6256
6387
|
markdown:
|
|
6257
|
-
"## upsert\n\n`client.v1Beta.customers.entities.upsert(id: string, entities: { id: string;
|
|
6388
|
+
"## upsert\n\n`client.v1Beta.customers.entities.upsert(id: string, entities: { id: string; entityTypeId?: string; metadata?: object; }[], X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object[]; }`\n\n**put** `/api/v1-beta/customers/{id}/entities`\n\nCreates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.\n\n### Parameters\n\n- `id: string`\n\n- `entities: { id: string; entityTypeId?: string; metadata?: object; }[]`\n List of entities to create or update (1-100 entries)\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }[]; }`\n List of entities created or updated by an upsert request\n\n - `data: { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1Beta.customers.entities.upsert('id', { entities: [{ id: 'user-7f3a0c1d' }, { id: 'user-c4d1b2e9' }] });\n\nconsole.log(response);\n```",
|
|
6258
6389
|
perLanguage: {
|
|
6259
6390
|
typescript: {
|
|
6260
6391
|
method: 'client.v1Beta.customers.entities.upsert',
|
|
6261
6392
|
example:
|
|
6262
|
-
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1Beta.customers.entities.upsert('id', {\n entities: [\n {\n id: 'user-7f3a0c1d',\n
|
|
6393
|
+
"import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1Beta.customers.entities.upsert('id', {\n entities: [\n {\n id: 'user-7f3a0c1d',\n entityTypeId: 'user',\n metadata: { email: 'jane@acme.com', role: 'admin' },\n },\n {\n id: 'user-c4d1b2e9',\n entityTypeId: 'user',\n metadata: { email: 'john@acme.com' },\n },\n ],\n});\n\nconsole.log(response.data);",
|
|
6263
6394
|
},
|
|
6264
6395
|
python: {
|
|
6265
6396
|
method: 'v1_beta.customers.entities.upsert',
|
|
6266
6397
|
example:
|
|
6267
|
-
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1_beta.customers.entities.upsert(\n id="id",\n entities=[{\n "id": "user-7f3a0c1d",\n "
|
|
6398
|
+
'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1_beta.customers.entities.upsert(\n id="id",\n entities=[{\n "id": "user-7f3a0c1d",\n "entity_type_id": "user",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin",\n },\n }, {\n "id": "user-c4d1b2e9",\n "entity_type_id": "user",\n "metadata": {\n "email": "john@acme.com"\n },\n }],\n)\nprint(response.data)',
|
|
6268
6399
|
},
|
|
6269
6400
|
java: {
|
|
6270
6401
|
method: 'v1Beta().customers().entities().upsert',
|
|
@@ -6274,7 +6405,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6274
6405
|
go: {
|
|
6275
6406
|
method: 'client.V1Beta.Customers.Entities.Upsert',
|
|
6276
6407
|
example:
|
|
6277
|
-
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1Beta.Customers.Entities.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerEntityUpsertParams{\n\t\t\tEntities: []stigg.V1BetaCustomerEntityUpsertParamsEntity{{\n\t\t\t\tID:
|
|
6408
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1Beta.Customers.Entities.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerEntityUpsertParams{\n\t\t\tEntities: []stigg.V1BetaCustomerEntityUpsertParamsEntity{{\n\t\t\t\tID: "user-7f3a0c1d",\n\t\t\t\tEntityTypeID: stigg.String("user"),\n\t\t\t\tMetadata: map[string]string{\n\t\t\t\t\t"email": "jane@acme.com",\n\t\t\t\t\t"role": "admin",\n\t\t\t\t},\n\t\t\t}, {\n\t\t\t\tID: "user-c4d1b2e9",\n\t\t\t\tEntityTypeID: stigg.String("user"),\n\t\t\t\tMetadata: map[string]string{\n\t\t\t\t\t"email": "john@acme.com",\n\t\t\t\t},\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
6278
6409
|
},
|
|
6279
6410
|
ruby: {
|
|
6280
6411
|
method: 'v1_beta.customers.entities.upsert',
|
|
@@ -6289,11 +6420,11 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6289
6420
|
csharp: {
|
|
6290
6421
|
method: 'V1Beta.Customers.Entities.Upsert',
|
|
6291
6422
|
example:
|
|
6292
|
-
'EntityUpsertParams parameters = new()\n{\n ID = "id",\n Entities =\n [\n new()\n {\n ID = "user-7f3a0c1d",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "jane@acme.com" }, { "role", "admin" }\n },\n
|
|
6423
|
+
'EntityUpsertParams parameters = new()\n{\n ID = "id",\n Entities =\n [\n new()\n {\n ID = "user-7f3a0c1d",\n EntityTypeID = "user",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "jane@acme.com" }, { "role", "admin" }\n },\n },\n new()\n {\n ID = "user-c4d1b2e9",\n EntityTypeID = "user",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "john@acme.com" }\n },\n },\n ],\n};\n\nvar response = await client.V1Beta.Customers.Entities.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
6293
6424
|
},
|
|
6294
6425
|
http: {
|
|
6295
6426
|
example:
|
|
6296
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entities": [\n {\n "id": "user-7f3a0c1d",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin"\n }
|
|
6427
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entities": [\n {\n "id": "user-7f3a0c1d",\n "entityTypeId": "user",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin"\n }\n },\n {\n "id": "user-c4d1b2e9",\n "entityTypeId": "user",\n "metadata": {\n "email": "john@acme.com"\n }\n }\n ]\n }\'',
|
|
6297
6428
|
},
|
|
6298
6429
|
},
|
|
6299
6430
|
},
|
|
@@ -6307,9 +6438,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6307
6438
|
qualified: 'client.v1Beta.customers.entities.retrieve',
|
|
6308
6439
|
params: ['id: string;', 'entityId: string;', 'X-ACCOUNT-ID?: string;', 'X-ENVIRONMENT-ID?: string;'],
|
|
6309
6440
|
response:
|
|
6310
|
-
'{ data: { id: string; archivedAt: string; createdAt: string;
|
|
6441
|
+
'{ data: { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }; }',
|
|
6311
6442
|
markdown:
|
|
6312
|
-
"## retrieve\n\n`client.v1Beta.customers.entities.retrieve(id: string, entityId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1-beta/customers/{id}/entities/{entityId}`\n\nRetrieves a single entity for the given customer by its identifier.\n\n### Parameters\n\n- `id: string`\n\n- `entityId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string;
|
|
6443
|
+
"## retrieve\n\n`client.v1Beta.customers.entities.retrieve(id: string, entityId: string, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { data: object; }`\n\n**get** `/api/v1-beta/customers/{id}/entities/{entityId}`\n\nRetrieves a single entity for the given customer by its identifier.\n\n### Parameters\n\n- `id: string`\n\n- `entityId: string`\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; entityTypeId: string; metadata: object; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst entity = await client.v1Beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity);\n```",
|
|
6313
6444
|
perLanguage: {
|
|
6314
6445
|
typescript: {
|
|
6315
6446
|
method: 'client.v1Beta.customers.entities.retrieve',
|
|
@@ -6348,7 +6479,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6348
6479
|
},
|
|
6349
6480
|
http: {
|
|
6350
6481
|
example:
|
|
6351
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/$ENTITY_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6482
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities/$ENTITY_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6352
6483
|
},
|
|
6353
6484
|
},
|
|
6354
6485
|
},
|
|
@@ -6402,7 +6533,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6402
6533
|
},
|
|
6403
6534
|
http: {
|
|
6404
6535
|
example:
|
|
6405
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/archive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
6536
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities/archive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
6406
6537
|
},
|
|
6407
6538
|
},
|
|
6408
6539
|
},
|
|
@@ -6456,7 +6587,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6456
6587
|
},
|
|
6457
6588
|
http: {
|
|
6458
6589
|
example:
|
|
6459
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/unarchive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
6590
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/entities/unarchive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
6460
6591
|
},
|
|
6461
6592
|
},
|
|
6462
6593
|
},
|
|
@@ -6482,7 +6613,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6482
6613
|
response:
|
|
6483
6614
|
'{ id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }',
|
|
6484
6615
|
markdown:
|
|
6485
|
-
"## list\n\n`client.v1Beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }`\n\n**get** `/api/v1-beta/customers/{id}/assignments`\n\nReturns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `capabilityId?: string`\n Filter assignments to a specific capability
|
|
6616
|
+
"## list\n\n`client.v1Beta.customers.assignments.list(id: string, after?: string, before?: string, capabilityId?: string, entityId?: string, limit?: number, X-ACCOUNT-ID?: string, X-ENVIRONMENT-ID?: string): { id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }`\n\n**get** `/api/v1-beta/customers/{id}/assignments`\n\nReturns a cursor-paginated list of capability assignments for the given customer. An assignment ties an entity to a capability with a usage limit and reset cadence.\n\n### Parameters\n\n- `id: string`\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `capabilityId?: string`\n Filter assignments to a specific capability ID\n\n- `entityId?: string`\n Filter assignments to a specific entity ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `X-ACCOUNT-ID?: string`\n\n- `X-ENVIRONMENT-ID?: string`\n\n### Returns\n\n- `{ id: string; cadence: string; createdAt: string; entityId: string; parentId: string; scopeEntityIds: string[]; updatedAt: string; usageLimit: number; currencyId?: string; featureId?: string; }`\n A capability assignment for an entity belonging to a customer. Defines how much of the capability the entity may consume (`usageLimit`) and how often the counter resets (`cadence`).\n\n - `id: string`\n - `cadence: string`\n - `createdAt: string`\n - `entityId: string`\n - `parentId: string`\n - `scopeEntityIds: string[]`\n - `updatedAt: string`\n - `usageLimit: number`\n - `currencyId?: string`\n - `featureId?: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const assignmentListResponse of client.v1Beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse);\n}\n```",
|
|
6486
6617
|
perLanguage: {
|
|
6487
6618
|
typescript: {
|
|
6488
6619
|
method: 'client.v1Beta.customers.assignments.list',
|
|
@@ -6520,7 +6651,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6520
6651
|
},
|
|
6521
6652
|
http: {
|
|
6522
6653
|
example:
|
|
6523
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6654
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6524
6655
|
},
|
|
6525
6656
|
},
|
|
6526
6657
|
},
|
|
@@ -6581,7 +6712,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6581
6712
|
},
|
|
6582
6713
|
http: {
|
|
6583
6714
|
example:
|
|
6584
|
-
'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "entityId": "workspace-001",\n "cadence": "P1M",\n "featureId": "compute-minutes",\n "usageLimit": 1000\n },\n {\n "entityId": "workspace-002",\n "cadence": "P1M",\n "currencyId": "cred-type-tokens",\n "parentId": "workspace-001",\n "scopeEntityIds": [\n "user-1"\n ],\n "usageLimit": 2000\n }\n ]\n }\'',
|
|
6715
|
+
'curl https://edge.api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "entityId": "workspace-001",\n "cadence": "P1M",\n "featureId": "compute-minutes",\n "usageLimit": 1000\n },\n {\n "entityId": "workspace-002",\n "cadence": "P1M",\n "currencyId": "cred-type-tokens",\n "parentId": "workspace-001",\n "scopeEntityIds": [\n "user-1"\n ],\n "usageLimit": 2000\n }\n ]\n }\'',
|
|
6585
6716
|
},
|
|
6586
6717
|
},
|
|
6587
6718
|
},
|
|
@@ -6641,7 +6772,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6641
6772
|
'EntityTypeListParams parameters = new();\n\nvar page = await client.V1Beta.EntityTypes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6642
6773
|
},
|
|
6643
6774
|
http: {
|
|
6644
|
-
example:
|
|
6775
|
+
example:
|
|
6776
|
+
'curl https://edge.api.stigg.io/api/v1-beta/entity-types \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
6645
6777
|
},
|
|
6646
6778
|
},
|
|
6647
6779
|
},
|
|
@@ -6701,7 +6833,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6701
6833
|
},
|
|
6702
6834
|
http: {
|
|
6703
6835
|
example:
|
|
6704
|
-
'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "types": [\n {\n "id": "org",\n "attributionKeys": [\n "organizationId"\n ],\n "displayName": "Organization"\n },\n {\n "id": "team",\n "attributionKeys": [\n "teamId"\n ],\n "displayName": "Team"\n }\n ]\n }\'',
|
|
6836
|
+
'curl https://edge.api.stigg.io/api/v1-beta/entity-types \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "types": [\n {\n "id": "org",\n "attributionKeys": [\n "organizationId"\n ],\n "displayName": "Organization"\n },\n {\n "id": "team",\n "attributionKeys": [\n "teamId"\n ],\n "displayName": "Team"\n }\n ]\n }\'',
|
|
6705
6837
|
},
|
|
6706
6838
|
},
|
|
6707
6839
|
},
|
|
@@ -6726,7 +6858,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [
|
|
|
6726
6858
|
{
|
|
6727
6859
|
language: 'java',
|
|
6728
6860
|
content:
|
|
6729
|
-
'# Stigg Java API Library\n\n<!-- x-release-please-start-version -->\n[](https://central.sonatype.com/artifact/io.stigg/stigg-java/0.0.1)\n[](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1)\n<!-- x-release-please-end -->\n\nThe Stigg Java SDK provides convenient access to the Stigg REST API from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Stigg MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40stigg%2Ftypescript-mcp&config=eyJuYW1lIjoiQHN0aWdnL3R5cGVzY3JpcHQtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc3RpZ2ctbWNwLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IlgtQVBJLUtFWSI6Ik15IEFQSSBLZXkifX0)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40stigg%2Ftypescript-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fstigg-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22X-API-KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nJavadocs are available on [javadoc.io](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("io.stigg:stigg-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>io.stigg</groupId>\n <artifactId>stigg-java</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCustomerResponse customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n // Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n // Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | --------------- | -------------------- | -------- | ------------------------ |\n| `apiKey` | `stigg.apiKey` | `STIGG_API_KEY` | true | - |\n| `baseUrl` | `stigg.baseUrl` | `STIGG_BASE_URL` | true | `"https://api.stigg.io"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport io.stigg.client.StiggClient;\n\nStiggClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Stigg API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.v1().customers().retrieve(...)` should be called with an instance of `CustomerRetrieveParams`, and it will return an instance of `CustomerResponse`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.async().v1().customers().retrieve("REPLACE_ME");\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport io.stigg.client.StiggClientAsync;\nimport io.stigg.client.okhttp.StiggOkHttpClientAsync;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClientAsync client = StiggOkHttpClientAsync.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport io.stigg.core.http.Headers;\nimport io.stigg.core.http.HttpResponseFor;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nHttpResponseFor<CustomerResponse> customerResponse = client.v1().customers().withRawResponse().retrieve("REPLACE_ME");\n\nint statusCode = customerResponse.statusCode();\nHeaders headers = customerResponse.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse parsedCustomerResponse = customerResponse.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`StiggServiceException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](stigg-java-core/src/main/kotlin/io/stigg/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](stigg-java-core/src/main/kotlin/io/stigg/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](stigg-java-core/src/main/kotlin/io/stigg/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](stigg-java-core/src/main/kotlin/io/stigg/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnexpectedStatusCodeException.kt) |\n\n- [`StiggIoException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggIoException.kt): I/O networking errors.\n\n- [`StiggRetryableException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`StiggException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\n\n// Process as an Iterable\nfor (CustomerListResponse customer : page.autoPager()) {\n System.out.println(customer);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(customer -> System.out.println(customer));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](stigg-java-core/src/main/kotlin/io/stigg/core/http/AsyncStreamResponse.kt):\n\n```java\nimport io.stigg.core.http.AsyncStreamResponse;\nimport io.stigg.models.v1.customers.CustomerListPageAsync;\nimport io.stigg.models.v1.customers.CustomerListResponse;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<CustomerListPageAsync> pageFuture = client.async().v1().customers().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(customer -> {\n System.out.println(customer);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(CustomerListResponse customer) {\n System.out.println(customer);\n }\n\n @Override\n public void onComplete(Optional<Throwable> error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(customer -> {\n System.out.println(customer);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\nwhile (true) {\n for (CustomerListResponse customer : page.items()) {\n System.out.println(customer);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `STIGG_LOG` environment variable to `info`:\n\n```sh\nexport STIGG_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport STIGG_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.LogLevel;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `stigg-java-core` is published with a [configuration file](stigg-java-core/src/main/resources/META-INF/proguard/stigg-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.http.ProxyAuthenticator;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `stigg-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggClient`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClient.kt), [`StiggClientAsync`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsync.kt), [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt), and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), all of which can work with any HTTP client\n- `stigg-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) and [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), which provide a way to construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), respectively, using OkHttp\n- `stigg-java`\n - Depends on and exposes the APIs of both `stigg-java-core` and `stigg-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Copy `stigg-java-client-okhttp`\'s [`OkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Write a class that implements the [`HttpClient`](stigg-java-core/src/main/kotlin/io/stigg/core/http/HttpClient.kt) interface\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerUpdateParams;\n\nCustomerUpdateParams params = CustomerUpdateParams.builder()\n .passthrough(CustomerUpdateParams.Passthrough.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) object to its setter:\n\n```java\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder().build();\n```\n\nThe most straightforward way to create a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt):\n\n```java\nimport io.stigg.core.JsonMissing;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .id(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> additionalProperties = client.v1().customers().retrieve(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport io.stigg.core.JsonField;\nimport java.util.Optional;\n\nJsonField<Object> field = client.v1().customers().retrieve(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional<String> jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().responseValidation(true).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stiggio/stigg-java/issues) with questions, bugs, or suggestions.\n',
|
|
6861
|
+
'# Stigg Java API Library\n\n<!-- x-release-please-start-version -->\n[](https://central.sonatype.com/artifact/io.stigg/stigg-java/0.0.1)\n[](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1)\n<!-- x-release-please-end -->\n\nThe Stigg Java SDK provides convenient access to the Stigg REST API from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Stigg MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40stigg%2Ftypescript-mcp&config=eyJuYW1lIjoiQHN0aWdnL3R5cGVzY3JpcHQtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vc3RpZ2ctbWNwLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IlgtQVBJLUtFWSI6Ik15IEFQSSBLZXkifX0)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40stigg%2Ftypescript-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fstigg-mcp.stlmcp.com%22%2C%22headers%22%3A%7B%22X-API-KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n<!-- x-release-please-start-version -->\n\nJavadocs are available on [javadoc.io](https://javadoc.io/doc/io.stigg/stigg-java/0.0.1).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("io.stigg:stigg-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>io.stigg</groupId>\n <artifactId>stigg-java</artifactId>\n <version>0.0.1</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCustomerResponse customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n // Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n // Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | --------------- | -------------------- | -------- | ----------------------------- |\n| `apiKey` | `stigg.apiKey` | `STIGG_API_KEY` | true | - |\n| `baseUrl` | `stigg.baseUrl` | `STIGG_BASE_URL` | true | `"https://edge.api.stigg.io"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport io.stigg.client.StiggClient;\n\nStiggClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Stigg API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.v1().customers().retrieve(...)` should be called with an instance of `CustomerRetrieveParams`, and it will return an instance of `CustomerResponse`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClient client = StiggOkHttpClient.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.async().v1().customers().retrieve("REPLACE_ME");\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport io.stigg.client.StiggClientAsync;\nimport io.stigg.client.okhttp.StiggOkHttpClientAsync;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `stigg.apiKey` and `stigg.baseUrl` system properties\n// Or configures using the `STIGG_API_KEY` and `STIGG_BASE_URL` environment variables\nStiggClientAsync client = StiggOkHttpClientAsync.fromEnv();\n\nCompletableFuture<CustomerResponse> customerResponse = client.v1().customers().retrieve("REPLACE_ME");\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport io.stigg.core.http.Headers;\nimport io.stigg.core.http.HttpResponseFor;\nimport io.stigg.models.v1.customers.CustomerResponse;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nHttpResponseFor<CustomerResponse> customerResponse = client.v1().customers().withRawResponse().retrieve("REPLACE_ME");\n\nint statusCode = customerResponse.statusCode();\nHeaders headers = customerResponse.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse parsedCustomerResponse = customerResponse.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`StiggServiceException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](stigg-java-core/src/main/kotlin/io/stigg/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](stigg-java-core/src/main/kotlin/io/stigg/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](stigg-java-core/src/main/kotlin/io/stigg/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](stigg-java-core/src/main/kotlin/io/stigg/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](stigg-java-core/src/main/kotlin/io/stigg/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](stigg-java-core/src/main/kotlin/io/stigg/errors/UnexpectedStatusCodeException.kt) |\n\n- [`StiggIoException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggIoException.kt): I/O networking errors.\n\n- [`StiggRetryableException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`StiggException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\n\n// Process as an Iterable\nfor (CustomerListResponse customer : page.autoPager()) {\n System.out.println(customer);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(customer -> System.out.println(customer));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](stigg-java-core/src/main/kotlin/io/stigg/core/http/AsyncStreamResponse.kt):\n\n```java\nimport io.stigg.core.http.AsyncStreamResponse;\nimport io.stigg.models.v1.customers.CustomerListPageAsync;\nimport io.stigg.models.v1.customers.CustomerListResponse;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<CustomerListPageAsync> pageFuture = client.async().v1().customers().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(customer -> {\n System.out.println(customer);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(CustomerListResponse customer) {\n System.out.println(customer);\n }\n\n @Override\n public void onComplete(Optional<Throwable> error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(customer -> {\n System.out.println(customer);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport io.stigg.models.v1.customers.CustomerListPage;\nimport io.stigg.models.v1.customers.CustomerListResponse;\n\nCustomerListPage page = client.v1().customers().list();\nwhile (true) {\n for (CustomerListResponse customer : page.items()) {\n System.out.println(customer);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `STIGG_LOG` environment variable to `info`:\n\n```sh\nexport STIGG_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport STIGG_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.LogLevel;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `stigg-java-core` is published with a [configuration file](stigg-java-core/src/main/resources/META-INF/proguard/stigg-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.core.http.ProxyAuthenticator;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport java.time.Duration;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `stigg-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggClient`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClient.kt), [`StiggClientAsync`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsync.kt), [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt), and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), all of which can work with any HTTP client\n- `stigg-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) and [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), which provide a way to construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) and [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), respectively, using OkHttp\n- `stigg-java`\n - Depends on and exposes the APIs of both `stigg-java-core` and `stigg-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Copy `stigg-java-client-okhttp`\'s [`OkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`stigg-java` dependency](#installation) with `stigg-java-core`\n2. Write a class that implements the [`HttpClient`](stigg-java-core/src/main/kotlin/io/stigg/core/http/HttpClient.kt) interface\n3. Construct [`StiggClientImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientImpl.kt) or [`StiggClientAsyncImpl`](stigg-java-core/src/main/kotlin/io/stigg/client/StiggClientAsyncImpl.kt), similarly to [`StiggOkHttpClient`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClient.kt) or [`StiggOkHttpClientAsync`](stigg-java-client-okhttp/src/main/kotlin/io/stigg/client/okhttp/StiggOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport io.stigg.core.JsonValue;\nimport io.stigg.models.v1.customers.CustomerUpdateParams;\n\nCustomerUpdateParams params = CustomerUpdateParams.builder()\n .passthrough(CustomerUpdateParams.Passthrough.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) object to its setter:\n\n```java\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder().build();\n```\n\nThe most straightforward way to create a [`JsonValue`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](stigg-java-core/src/main/kotlin/io/stigg/core/Values.kt):\n\n```java\nimport io.stigg.core.JsonMissing;\nimport io.stigg.models.v1.customers.CustomerRetrieveParams;\n\nCustomerRetrieveParams params = CustomerRetrieveParams.builder()\n .id(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport io.stigg.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> additionalProperties = client.v1().customers().retrieve(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport io.stigg.core.JsonField;\nimport java.util.Optional;\n\nJsonField<Object> field = client.v1().customers().retrieve(params)._field();\n\nif (field.isMissing()) {\n // The property is absent from the JSON response\n} else if (field.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional<String> jsonString = field.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = field.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`StiggInvalidDataException`](stigg-java-core/src/main/kotlin/io/stigg/errors/StiggInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport io.stigg.models.v1.customers.CustomerResponse;\n\nCustomerResponse customerResponse = client.v1().customers().retrieve(RequestOptions.builder().responseValidation(true).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\n\nStiggClient client = StiggOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stiggio/stigg-java/issues) with questions, bugs, or suggestions.\n',
|
|
6730
6862
|
},
|
|
6731
6863
|
{
|
|
6732
6864
|
language: 'python',
|