@stigg/api-client-js 0.8.1 → 0.358.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ const graphql_tag_1 = require("graphql-tag");
8
8
  var AccessDeniedReason;
9
9
  (function (AccessDeniedReason) {
10
10
  AccessDeniedReason["CustomerNotFound"] = "CustomerNotFound";
11
+ AccessDeniedReason["CustomerResourceNotFound"] = "CustomerResourceNotFound";
11
12
  AccessDeniedReason["FeatureNotFound"] = "FeatureNotFound";
12
13
  AccessDeniedReason["NoActiveSubscription"] = "NoActiveSubscription";
13
14
  AccessDeniedReason["NoFeatureEntitlementInSubscription"] = "NoFeatureEntitlementInSubscription";
@@ -317,6 +318,7 @@ var ErrorCode;
317
318
  ErrorCode["CustomerHasNoPaymentMethod"] = "CustomerHasNoPaymentMethod";
318
319
  ErrorCode["CustomerNoBillingId"] = "CustomerNoBillingId";
319
320
  ErrorCode["CustomerNotFound"] = "CustomerNotFound";
321
+ ErrorCode["CustomerResourceNotFound"] = "CustomerResourceNotFound";
320
322
  ErrorCode["DowngradeBillingPeriodNotSupportedError"] = "DowngradeBillingPeriodNotSupportedError";
321
323
  ErrorCode["DraftPlanCantBeArchived"] = "DraftPlanCantBeArchived";
322
324
  ErrorCode["DuplicatedEntityNotAllowed"] = "DuplicatedEntityNotAllowed";
@@ -826,348 +828,334 @@ var ExperimentGroupType;
826
828
  ExperimentGroupType["Variant"] = "VARIANT";
827
829
  })(ExperimentGroupType = exports.ExperimentGroupType || (exports.ExperimentGroupType = {}));
828
830
  exports.PriceFragmentDoc = (0, graphql_tag_1.default) `
829
- fragment PriceFragment on Price {
830
- billingModel
831
- billingPeriod
832
- billingId
833
- minUnitQuantity
834
- maxUnitQuantity
835
- billingCountryCode
836
- price {
837
- amount
838
- currency
839
- }
840
- feature {
841
- featureUnits
842
- featureUnitsPlural
843
- displayName
844
- }
845
- }
846
- `;
847
- exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) `
848
- fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
849
- subTotal {
850
- amount
851
- currency
852
- }
853
- total {
854
- amount
855
- currency
856
- }
857
- }
858
- `;
859
- exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) `
860
- fragment SlimSubscriptionFragment on CustomerSubscription {
861
- id
862
- refId
863
- status
864
- additionalMetaData
865
- billingId
866
- billingLinkUrl
867
- effectiveEndDate
868
- currentBillingPeriodEnd
869
- pricingType
870
- experimentInfo {
871
- name
872
- id
873
- groupName
874
- groupType
875
- }
876
- prices {
877
- usageLimit
831
+ fragment PriceFragment on Price {
832
+ billingModel
833
+ billingPeriod
834
+ billingId
835
+ minUnitQuantity
836
+ maxUnitQuantity
837
+ billingCountryCode
878
838
  price {
879
- ...PriceFragment
839
+ amount
840
+ currency
841
+ }
842
+ feature {
843
+ featureUnits
844
+ featureUnitsPlural
845
+ displayName
880
846
  }
881
847
  }
882
- totalPrice {
883
- ...TotalPriceFragment
848
+ `;
849
+ exports.TotalPriceFragmentDoc = (0, graphql_tag_1.default) `
850
+ fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
851
+ subTotal {
852
+ amount
853
+ currency
854
+ }
855
+ total {
856
+ amount
857
+ currency
858
+ }
884
859
  }
885
- plan {
860
+ `;
861
+ exports.SlimSubscriptionFragmentDoc = (0, graphql_tag_1.default) `
862
+ fragment SlimSubscriptionFragment on CustomerSubscription {
886
863
  id
887
864
  refId
888
- }
889
- addons {
890
- quantity
891
- addon {
865
+ status
866
+ additionalMetaData
867
+ billingId
868
+ billingLinkUrl
869
+ effectiveEndDate
870
+ currentBillingPeriodEnd
871
+ pricingType
872
+ experimentInfo {
873
+ name
874
+ id
875
+ groupName
876
+ groupType
877
+ }
878
+ prices {
879
+ usageLimit
880
+ price {
881
+ ...PriceFragment
882
+ }
883
+ }
884
+ totalPrice {
885
+ ...TotalPriceFragment
886
+ }
887
+ plan {
888
+ id
889
+ refId
890
+ }
891
+ addons {
892
+ quantity
893
+ addon {
894
+ id
895
+ refId
896
+ }
897
+ }
898
+ customer {
892
899
  id
893
900
  refId
894
901
  }
895
902
  }
896
- customer {
903
+ ${exports.PriceFragmentDoc}
904
+ ${exports.TotalPriceFragmentDoc}
905
+ `;
906
+ exports.CouponFragmentDoc = (0, graphql_tag_1.default) `
907
+ fragment CouponFragment on Coupon {
897
908
  id
909
+ discountValue
910
+ type
911
+ additionalMetaData
898
912
  refId
899
- }
900
- }
901
- ${exports.PriceFragmentDoc}
902
- ${exports.TotalPriceFragmentDoc}`;
903
- exports.CouponFragmentDoc = (0, graphql_tag_1.default) `
904
- fragment CouponFragment on Coupon {
905
- id
906
- discountValue
907
- type
908
- additionalMetaData
909
- refId
910
- name
911
- description
912
- createdAt
913
- updatedAt
914
- billingId
915
- billingLinkUrl
916
- type
917
- status
918
- syncStates {
919
- vendorIdentifier
913
+ name
914
+ description
915
+ createdAt
916
+ updatedAt
917
+ billingId
918
+ billingLinkUrl
919
+ type
920
920
  status
921
+ syncStates {
922
+ vendorIdentifier
923
+ status
924
+ }
925
+ customers {
926
+ id
927
+ }
921
928
  }
922
- customers {
923
- id
924
- }
925
- }
926
- `;
929
+ `;
927
930
  exports.PromotionalEntitlementFragmentDoc = (0, graphql_tag_1.default) `
928
- fragment PromotionalEntitlementFragment on PromotionalEntitlement {
929
- status
930
- usageLimit
931
- featureId
932
- hasUnlimitedUsage
933
- resetPeriod
934
- endDate
935
- isVisible
936
- feature {
937
- featureType
938
- meterType
939
- featureUnits
940
- featureUnitsPlural
941
- displayName
942
- description
943
- refId
944
- additionalMetaData
931
+ fragment PromotionalEntitlementFragment on PromotionalEntitlement {
932
+ status
933
+ usageLimit
934
+ featureId
935
+ hasUnlimitedUsage
936
+ resetPeriod
937
+ endDate
938
+ isVisible
939
+ feature {
940
+ featureType
941
+ meterType
942
+ featureUnits
943
+ featureUnitsPlural
944
+ displayName
945
+ description
946
+ refId
947
+ additionalMetaData
948
+ }
945
949
  }
946
- }
947
- `;
950
+ `;
948
951
  exports.PackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
949
- fragment PackageEntitlementFragment on PackageEntitlement {
950
- usageLimit
951
- hasUnlimitedUsage
952
- featureId
953
- resetPeriod
954
- hiddenFromWidgets
955
- isCustom
956
- displayNameOverride
957
- feature {
958
- featureType
959
- meterType
960
- featureUnits
961
- featureUnitsPlural
962
- displayName
963
- description
964
- refId
965
- additionalMetaData
952
+ fragment PackageEntitlementFragment on PackageEntitlement {
953
+ usageLimit
954
+ hasUnlimitedUsage
955
+ featureId
956
+ resetPeriod
957
+ hiddenFromWidgets
958
+ isCustom
959
+ displayNameOverride
960
+ feature {
961
+ featureType
962
+ meterType
963
+ featureUnits
964
+ featureUnitsPlural
965
+ displayName
966
+ description
967
+ refId
968
+ additionalMetaData
969
+ }
966
970
  }
967
- }
968
- `;
971
+ `;
969
972
  exports.AddonFragmentDoc = (0, graphql_tag_1.default) `
970
- fragment AddonFragment on Addon {
971
- id
972
- refId
973
- billingId
974
- displayName
975
- description
976
- additionalMetaData
977
- entitlements {
978
- ...PackageEntitlementFragment
979
- }
980
- prices {
981
- ...PriceFragment
982
- }
983
- pricingType
984
- }
985
- ${exports.PackageEntitlementFragmentDoc}
986
- ${exports.PriceFragmentDoc}`;
987
- exports.PlanFragmentDoc = (0, graphql_tag_1.default) `
988
- fragment PlanFragment on Plan {
989
- id
990
- refId
991
- displayName
992
- description
993
- billingId
994
- additionalMetaData
995
- product {
973
+ fragment AddonFragment on Addon {
974
+ id
996
975
  refId
976
+ billingId
997
977
  displayName
998
978
  description
999
979
  additionalMetaData
1000
- productSettings {
1001
- downgradePlan {
1002
- refId
1003
- displayName
1004
- }
980
+ entitlements {
981
+ ...PackageEntitlementFragment
1005
982
  }
983
+ prices {
984
+ ...PriceFragment
985
+ }
986
+ pricingType
1006
987
  }
1007
- basePlan {
1008
- refId
1009
- displayName
1010
- }
1011
- entitlements {
1012
- ...PackageEntitlementFragment
1013
- }
1014
- inheritedEntitlements {
1015
- ...PackageEntitlementFragment
1016
- }
1017
- compatibleAddons {
1018
- ...AddonFragment
1019
- }
1020
- prices {
1021
- ...PriceFragment
1022
- }
1023
- pricingType
1024
- defaultTrialConfig {
1025
- duration
1026
- units
1027
- }
1028
- }
1029
- ${exports.PackageEntitlementFragmentDoc}
1030
- ${exports.AddonFragmentDoc}
1031
- ${exports.PriceFragmentDoc}`;
1032
- exports.SubscriptionScheduledUpdateDataFragmentDoc = (0, graphql_tag_1.default) `
1033
- fragment SubscriptionScheduledUpdateData on SubscriptionScheduledUpdate {
1034
- subscriptionScheduleType
1035
- scheduleStatus
1036
- scheduledExecutionTime
1037
- targetPackage {
988
+ ${exports.PackageEntitlementFragmentDoc}
989
+ ${exports.PriceFragmentDoc}
990
+ `;
991
+ exports.PlanFragmentDoc = (0, graphql_tag_1.default) `
992
+ fragment PlanFragment on Plan {
1038
993
  id
1039
994
  refId
1040
995
  displayName
1041
- }
1042
- scheduleVariables {
1043
- ... on DowngradeChangeVariables {
1044
- addonRefIds
1045
- billingPeriod
1046
- downgradePlanRefId
996
+ description
997
+ billingId
998
+ additionalMetaData
999
+ product {
1000
+ refId
1001
+ displayName
1002
+ description
1003
+ additionalMetaData
1004
+ productSettings {
1005
+ downgradePlan {
1006
+ refId
1007
+ displayName
1008
+ }
1009
+ }
1047
1010
  }
1048
- ... on BillingPeriodChangeVariables {
1049
- billingPeriod
1011
+ basePlan {
1012
+ refId
1013
+ displayName
1050
1014
  }
1051
- ... on UnitAmountChangeVariables {
1052
- newUnitAmount
1015
+ entitlements {
1016
+ ...PackageEntitlementFragment
1053
1017
  }
1054
- }
1055
- }
1056
- `;
1057
- exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
1058
- fragment SubscriptionFragment on CustomerSubscription {
1059
- id
1060
- startDate
1061
- endDate
1062
- trialEndDate
1063
- cancellationDate
1064
- effectiveEndDate
1065
- status
1066
- refId
1067
- currentBillingPeriodEnd
1068
- additionalMetaData
1069
- billingId
1070
- billingLinkUrl
1071
- experimentInfo {
1072
- name
1073
- groupType
1074
- groupName
1075
- id
1076
- }
1077
- prices {
1078
- usageLimit
1079
- price {
1018
+ inheritedEntitlements {
1019
+ ...PackageEntitlementFragment
1020
+ }
1021
+ compatibleAddons {
1022
+ ...AddonFragment
1023
+ }
1024
+ prices {
1080
1025
  ...PriceFragment
1081
1026
  }
1027
+ pricingType
1028
+ defaultTrialConfig {
1029
+ duration
1030
+ units
1031
+ }
1082
1032
  }
1083
- totalPrice {
1084
- ...TotalPriceFragment
1085
- }
1086
- pricingType
1087
- plan {
1088
- ...PlanFragment
1033
+ ${exports.PackageEntitlementFragmentDoc}
1034
+ ${exports.AddonFragmentDoc}
1035
+ ${exports.PriceFragmentDoc}
1036
+ `;
1037
+ exports.SubscriptionScheduledUpdateDataFragmentDoc = (0, graphql_tag_1.default) `
1038
+ fragment SubscriptionScheduledUpdateData on SubscriptionScheduledUpdate {
1039
+ subscriptionScheduleType
1040
+ scheduleStatus
1041
+ scheduledExecutionTime
1042
+ targetPackage {
1043
+ id
1044
+ refId
1045
+ displayName
1046
+ }
1047
+ scheduleVariables {
1048
+ ... on DowngradeChangeVariables {
1049
+ addonRefIds
1050
+ billingPeriod
1051
+ downgradePlanRefId
1052
+ }
1053
+ ... on BillingPeriodChangeVariables {
1054
+ billingPeriod
1055
+ }
1056
+ ... on UnitAmountChangeVariables {
1057
+ newUnitAmount
1058
+ }
1059
+ }
1089
1060
  }
1090
- addons {
1061
+ `;
1062
+ exports.SubscriptionFragmentDoc = (0, graphql_tag_1.default) `
1063
+ fragment SubscriptionFragment on CustomerSubscription {
1091
1064
  id
1092
- quantity
1093
- addon {
1094
- ...AddonFragment
1065
+ startDate
1066
+ endDate
1067
+ trialEndDate
1068
+ cancellationDate
1069
+ effectiveEndDate
1070
+ status
1071
+ refId
1072
+ currentBillingPeriodEnd
1073
+ additionalMetaData
1074
+ billingId
1075
+ billingLinkUrl
1076
+ experimentInfo {
1077
+ name
1078
+ groupType
1079
+ groupName
1080
+ id
1081
+ }
1082
+ prices {
1083
+ usageLimit
1084
+ price {
1085
+ ...PriceFragment
1086
+ }
1087
+ }
1088
+ totalPrice {
1089
+ ...TotalPriceFragment
1090
+ }
1091
+ pricingType
1092
+ plan {
1093
+ ...PlanFragment
1094
+ }
1095
+ addons {
1096
+ id
1097
+ quantity
1098
+ addon {
1099
+ ...AddonFragment
1100
+ }
1101
+ }
1102
+ scheduledUpdates {
1103
+ ...SubscriptionScheduledUpdateData
1095
1104
  }
1096
1105
  }
1097
- scheduledUpdates {
1098
- ...SubscriptionScheduledUpdateData
1099
- }
1100
- }
1101
- ${exports.PriceFragmentDoc}
1102
- ${exports.TotalPriceFragmentDoc}
1103
- ${exports.PlanFragmentDoc}
1104
- ${exports.AddonFragmentDoc}
1105
- ${exports.SubscriptionScheduledUpdateDataFragmentDoc}`;
1106
+ ${exports.PriceFragmentDoc}
1107
+ ${exports.TotalPriceFragmentDoc}
1108
+ ${exports.PlanFragmentDoc}
1109
+ ${exports.AddonFragmentDoc}
1110
+ ${exports.SubscriptionScheduledUpdateDataFragmentDoc}
1111
+ `;
1106
1112
  exports.CustomerFragmentDoc = (0, graphql_tag_1.default) `
1107
- fragment CustomerFragment on Customer {
1108
- id
1109
- name
1110
- email
1111
- createdAt
1112
- updatedAt
1113
- hasPaymentMethod
1114
- refId
1115
- billingId
1116
- defaultPaymentExpirationMonth
1117
- defaultPaymentExpirationYear
1118
- defaultPaymentMethodLast4Digits
1119
- additionalMetaData
1120
- trialedPlans {
1121
- productId
1122
- productRefId
1123
- planRefId
1124
- planId
1125
- }
1126
- experimentInfo {
1127
- groupType
1128
- groupName
1113
+ fragment CustomerFragment on Customer {
1129
1114
  id
1130
1115
  name
1116
+ email
1117
+ createdAt
1118
+ updatedAt
1119
+ hasPaymentMethod
1120
+ refId
1121
+ billingId
1122
+ defaultPaymentExpirationMonth
1123
+ defaultPaymentExpirationYear
1124
+ defaultPaymentMethodLast4Digits
1125
+ additionalMetaData
1126
+ trialedPlans {
1127
+ productId
1128
+ productRefId
1129
+ planRefId
1130
+ planId
1131
+ }
1132
+ experimentInfo {
1133
+ groupType
1134
+ groupName
1135
+ id
1136
+ name
1137
+ }
1138
+ coupon {
1139
+ ...CouponFragment
1140
+ }
1141
+ eligibleForTrial {
1142
+ productId
1143
+ productRefId
1144
+ eligible
1145
+ }
1146
+ promotionalEntitlements {
1147
+ ...PromotionalEntitlementFragment
1148
+ }
1149
+ subscriptions {
1150
+ ...SubscriptionFragment
1151
+ }
1131
1152
  }
1132
- coupon {
1133
- ...CouponFragment
1134
- }
1135
- eligibleForTrial {
1136
- productId
1137
- productRefId
1138
- eligible
1139
- }
1140
- promotionalEntitlements {
1141
- ...PromotionalEntitlementFragment
1142
- }
1143
- subscriptions {
1144
- ...SubscriptionFragment
1145
- }
1146
- }
1147
- ${exports.CouponFragmentDoc}
1148
- ${exports.PromotionalEntitlementFragmentDoc}
1149
- ${exports.SubscriptionFragmentDoc}`;
1153
+ ${exports.CouponFragmentDoc}
1154
+ ${exports.PromotionalEntitlementFragmentDoc}
1155
+ ${exports.SubscriptionFragmentDoc}
1156
+ `;
1150
1157
  exports.SubscriptionPreviewFragmentDoc = (0, graphql_tag_1.default) `
1151
- fragment SubscriptionPreviewFragment on SubscriptionPreview {
1152
- subTotal {
1153
- amount
1154
- currency
1155
- }
1156
- total {
1157
- amount
1158
- currency
1159
- }
1160
- billingPeriodRange {
1161
- start
1162
- end
1163
- }
1164
- discount {
1165
- type
1166
- value
1167
- durationType
1168
- durationInMonths
1169
- }
1170
- subscription {
1158
+ fragment SubscriptionPreviewFragment on SubscriptionPreview {
1171
1159
  subTotal {
1172
1160
  amount
1173
1161
  currency
@@ -1176,339 +1164,379 @@ exports.SubscriptionPreviewFragmentDoc = (0, graphql_tag_1.default) `
1176
1164
  amount
1177
1165
  currency
1178
1166
  }
1179
- }
1180
- proration {
1181
- prorationDate
1182
- credit {
1183
- amount
1184
- currency
1167
+ billingPeriodRange {
1168
+ start
1169
+ end
1185
1170
  }
1186
- debit {
1187
- amount
1188
- currency
1171
+ discount {
1172
+ type
1173
+ value
1174
+ durationType
1175
+ durationInMonths
1189
1176
  }
1190
- netAmount {
1191
- amount
1192
- currency
1177
+ subscription {
1178
+ subTotal {
1179
+ amount
1180
+ currency
1181
+ }
1182
+ total {
1183
+ amount
1184
+ currency
1185
+ }
1186
+ }
1187
+ proration {
1188
+ prorationDate
1189
+ credit {
1190
+ amount
1191
+ currency
1192
+ }
1193
+ debit {
1194
+ amount
1195
+ currency
1196
+ }
1197
+ netAmount {
1198
+ amount
1199
+ currency
1200
+ }
1193
1201
  }
1194
1202
  }
1195
- }
1196
- `;
1203
+ `;
1197
1204
  exports.MonthlyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) `
1198
- fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {
1199
- monthlyAccordingTo
1200
- }
1201
- `;
1205
+ fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {
1206
+ monthlyAccordingTo
1207
+ }
1208
+ `;
1202
1209
  exports.WeeklyResetPeriodConfigFragmentDoc = (0, graphql_tag_1.default) `
1203
- fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {
1204
- weeklyAccordingTo
1205
- }
1206
- `;
1207
- exports.ResetPeriodConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1208
- fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {
1209
- __typename
1210
- ... on MonthlyResetPeriodConfig {
1211
- ...MonthlyResetPeriodConfigFragment
1210
+ fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {
1211
+ weeklyAccordingTo
1212
1212
  }
1213
- ... on WeeklyResetPeriodConfig {
1214
- ...WeeklyResetPeriodConfigFragment
1213
+ `;
1214
+ exports.ResetPeriodConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1215
+ fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {
1216
+ __typename
1217
+ ... on MonthlyResetPeriodConfig {
1218
+ ...MonthlyResetPeriodConfigFragment
1219
+ }
1220
+ ... on WeeklyResetPeriodConfig {
1221
+ ...WeeklyResetPeriodConfigFragment
1222
+ }
1215
1223
  }
1216
- }
1217
- ${exports.MonthlyResetPeriodConfigFragmentDoc}
1218
- ${exports.WeeklyResetPeriodConfigFragmentDoc}`;
1224
+ ${exports.MonthlyResetPeriodConfigFragmentDoc}
1225
+ ${exports.WeeklyResetPeriodConfigFragmentDoc}
1226
+ `;
1219
1227
  exports.FeatureFragmentDoc = (0, graphql_tag_1.default) `
1220
- fragment FeatureFragment on EntitlementFeature {
1221
- featureType
1222
- meterType
1223
- featureUnits
1224
- featureUnitsPlural
1225
- description
1226
- displayName
1227
- refId
1228
- }
1229
- `;
1230
- exports.EntitlementFragmentDoc = (0, graphql_tag_1.default) `
1231
- fragment EntitlementFragment on Entitlement {
1232
- isGranted
1233
- accessDeniedReason
1234
- customerId
1235
- usageLimit
1236
- hasUnlimitedUsage
1237
- currentUsage
1238
- requestedUsage
1239
- entitlementUpdatedAt
1240
- usageUpdatedAt
1241
- nextResetDate
1242
- resetPeriod
1243
- resetPeriodConfiguration {
1244
- ...ResetPeriodConfigurationFragment
1245
- }
1246
- feature {
1247
- ...FeatureFragment
1248
- }
1249
- }
1250
- ${exports.ResetPeriodConfigurationFragmentDoc}
1251
- ${exports.FeatureFragmentDoc}`;
1252
- exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
1253
- fragment PaywallPackageEntitlementFragment on PackageEntitlement {
1254
- usageLimit
1255
- hasUnlimitedUsage
1256
- featureId
1257
- resetPeriod
1258
- feature {
1228
+ fragment FeatureFragment on EntitlementFeature {
1259
1229
  featureType
1260
1230
  meterType
1261
1231
  featureUnits
1262
1232
  featureUnitsPlural
1263
- displayName
1264
1233
  description
1234
+ displayName
1265
1235
  refId
1266
1236
  }
1267
- }
1268
- `;
1269
- exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
1270
- fragment PaywallAddonFragment on Addon {
1271
- id
1272
- refId
1273
- billingId
1274
- displayName
1275
- description
1276
- entitlements {
1277
- ...PaywallPackageEntitlementFragment
1237
+ `;
1238
+ exports.EntitlementFragmentDoc = (0, graphql_tag_1.default) `
1239
+ fragment EntitlementFragment on Entitlement {
1240
+ isGranted
1241
+ accessDeniedReason
1242
+ customerId
1243
+ usageLimit
1244
+ hasUnlimitedUsage
1245
+ currentUsage
1246
+ requestedUsage
1247
+ entitlementUpdatedAt
1248
+ usageUpdatedAt
1249
+ nextResetDate
1250
+ resetPeriod
1251
+ resetPeriodConfiguration {
1252
+ ...ResetPeriodConfigurationFragment
1253
+ }
1254
+ feature {
1255
+ ...FeatureFragment
1256
+ }
1278
1257
  }
1279
- prices {
1280
- ...PriceFragment
1258
+ ${exports.ResetPeriodConfigurationFragmentDoc}
1259
+ ${exports.FeatureFragmentDoc}
1260
+ `;
1261
+ exports.PaywallPackageEntitlementFragmentDoc = (0, graphql_tag_1.default) `
1262
+ fragment PaywallPackageEntitlementFragment on PackageEntitlement {
1263
+ usageLimit
1264
+ hasUnlimitedUsage
1265
+ featureId
1266
+ resetPeriod
1267
+ feature {
1268
+ featureType
1269
+ meterType
1270
+ featureUnits
1271
+ featureUnitsPlural
1272
+ displayName
1273
+ description
1274
+ refId
1275
+ }
1281
1276
  }
1282
- additionalMetaData
1283
- pricingType
1284
- }
1285
- ${exports.PaywallPackageEntitlementFragmentDoc}
1286
- ${exports.PriceFragmentDoc}`;
1287
- exports.PaywallPlanFragmentDoc = (0, graphql_tag_1.default) `
1288
- fragment PaywallPlanFragment on Plan {
1289
- id
1290
- refId
1291
- description
1292
- displayName
1293
- billingId
1294
- product {
1277
+ `;
1278
+ exports.PaywallAddonFragmentDoc = (0, graphql_tag_1.default) `
1279
+ fragment PaywallAddonFragment on Addon {
1280
+ id
1295
1281
  refId
1282
+ billingId
1296
1283
  displayName
1297
1284
  description
1298
- additionalMetaData
1299
- productSettings {
1300
- downgradePlan {
1301
- refId
1302
- displayName
1303
- }
1285
+ entitlements {
1286
+ ...PaywallPackageEntitlementFragment
1304
1287
  }
1288
+ prices {
1289
+ ...PriceFragment
1290
+ }
1291
+ additionalMetaData
1292
+ pricingType
1305
1293
  }
1306
- basePlan {
1294
+ ${exports.PaywallPackageEntitlementFragmentDoc}
1295
+ ${exports.PriceFragmentDoc}
1296
+ `;
1297
+ exports.PaywallPlanFragmentDoc = (0, graphql_tag_1.default) `
1298
+ fragment PaywallPlanFragment on Plan {
1299
+ id
1307
1300
  refId
1301
+ description
1308
1302
  displayName
1303
+ billingId
1304
+ product {
1305
+ refId
1306
+ displayName
1307
+ description
1308
+ additionalMetaData
1309
+ productSettings {
1310
+ downgradePlan {
1311
+ refId
1312
+ displayName
1313
+ }
1314
+ }
1315
+ }
1316
+ basePlan {
1317
+ refId
1318
+ displayName
1319
+ }
1320
+ entitlements {
1321
+ ...PaywallPackageEntitlementFragment
1322
+ }
1323
+ additionalMetaData
1324
+ inheritedEntitlements {
1325
+ ...PaywallPackageEntitlementFragment
1326
+ }
1327
+ prices {
1328
+ ...PriceFragment
1329
+ }
1330
+ pricingType
1331
+ defaultTrialConfig {
1332
+ duration
1333
+ units
1334
+ }
1335
+ compatibleAddons {
1336
+ ...PaywallAddonFragment
1337
+ }
1309
1338
  }
1310
- entitlements {
1311
- ...PaywallPackageEntitlementFragment
1312
- }
1313
- additionalMetaData
1314
- inheritedEntitlements {
1315
- ...PaywallPackageEntitlementFragment
1316
- }
1317
- prices {
1318
- ...PriceFragment
1319
- }
1320
- pricingType
1321
- defaultTrialConfig {
1322
- duration
1323
- units
1324
- }
1325
- compatibleAddons {
1326
- ...PaywallAddonFragment
1327
- }
1328
- }
1329
- ${exports.PaywallPackageEntitlementFragmentDoc}
1330
- ${exports.PriceFragmentDoc}
1331
- ${exports.PaywallAddonFragmentDoc}`;
1339
+ ${exports.PaywallPackageEntitlementFragmentDoc}
1340
+ ${exports.PriceFragmentDoc}
1341
+ ${exports.PaywallAddonFragmentDoc}
1342
+ `;
1332
1343
  exports.FontVariantFragmentDoc = (0, graphql_tag_1.default) `
1333
- fragment FontVariantFragment on FontVariant {
1334
- fontSize
1335
- fontWeight
1336
- }
1337
- `;
1338
- exports.TypographyConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1339
- fragment TypographyConfigurationFragment on TypographyConfiguration {
1340
- fontFamily
1341
- h1 {
1342
- ...FontVariantFragment
1343
- }
1344
- h2 {
1345
- ...FontVariantFragment
1344
+ fragment FontVariantFragment on FontVariant {
1345
+ fontSize
1346
+ fontWeight
1346
1347
  }
1347
- h3 {
1348
- ...FontVariantFragment
1349
- }
1350
- body {
1351
- ...FontVariantFragment
1348
+ `;
1349
+ exports.TypographyConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1350
+ fragment TypographyConfigurationFragment on TypographyConfiguration {
1351
+ fontFamily
1352
+ h1 {
1353
+ ...FontVariantFragment
1354
+ }
1355
+ h2 {
1356
+ ...FontVariantFragment
1357
+ }
1358
+ h3 {
1359
+ ...FontVariantFragment
1360
+ }
1361
+ body {
1362
+ ...FontVariantFragment
1363
+ }
1352
1364
  }
1353
- }
1354
- ${exports.FontVariantFragmentDoc}`;
1365
+ ${exports.FontVariantFragmentDoc}
1366
+ `;
1355
1367
  exports.LayoutConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1356
- fragment LayoutConfigurationFragment on PaywallLayoutConfiguration {
1357
- alignment
1358
- planWidth
1359
- planMargin
1360
- planPadding
1361
- }
1362
- `;
1363
- exports.PaywallConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1364
- fragment PaywallConfigurationFragment on PaywallConfiguration {
1365
- palette {
1366
- primary
1367
- textColor
1368
- backgroundColor
1369
- borderColor
1370
- currentPlanBackground
1371
- }
1372
- typography {
1373
- ...TypographyConfigurationFragment
1368
+ fragment LayoutConfigurationFragment on PaywallLayoutConfiguration {
1369
+ alignment
1370
+ planWidth
1371
+ planMargin
1372
+ planPadding
1374
1373
  }
1375
- layout {
1376
- ...LayoutConfigurationFragment
1374
+ `;
1375
+ exports.PaywallConfigurationFragmentDoc = (0, graphql_tag_1.default) `
1376
+ fragment PaywallConfigurationFragment on PaywallConfiguration {
1377
+ palette {
1378
+ primary
1379
+ textColor
1380
+ backgroundColor
1381
+ borderColor
1382
+ currentPlanBackground
1383
+ }
1384
+ typography {
1385
+ ...TypographyConfigurationFragment
1386
+ }
1387
+ layout {
1388
+ ...LayoutConfigurationFragment
1389
+ }
1377
1390
  }
1378
- }
1379
- ${exports.TypographyConfigurationFragmentDoc}
1380
- ${exports.LayoutConfigurationFragmentDoc}`;
1391
+ ${exports.TypographyConfigurationFragmentDoc}
1392
+ ${exports.LayoutConfigurationFragmentDoc}
1393
+ `;
1381
1394
  exports.ProvisionCustomerDocument = (0, graphql_tag_1.default) `
1382
- mutation provisionCustomer($input: ProvisionCustomerInput!) {
1383
- provisionCustomer(input: $input) {
1384
- customer {
1385
- ...CustomerFragment
1386
- }
1387
- subscriptionDecisionStrategy
1388
- subscription {
1389
- ...SlimSubscriptionFragment
1395
+ mutation provisionCustomer($input: ProvisionCustomerInput!) {
1396
+ provisionCustomer(input: $input) {
1397
+ customer {
1398
+ ...CustomerFragment
1399
+ }
1400
+ subscriptionDecisionStrategy
1401
+ subscription {
1402
+ ...SlimSubscriptionFragment
1403
+ }
1390
1404
  }
1391
1405
  }
1392
- }
1393
- ${exports.CustomerFragmentDoc}
1394
- ${exports.SlimSubscriptionFragmentDoc}`;
1406
+ ${exports.CustomerFragmentDoc}
1407
+ ${exports.SlimSubscriptionFragmentDoc}
1408
+ `;
1395
1409
  exports.ImportCustomerDocument = (0, graphql_tag_1.default) `
1396
- mutation importCustomer($input: ImportCustomerInput!) {
1397
- importCustomer: importOneCustomer(input: $input) {
1398
- ...CustomerFragment
1410
+ mutation importCustomer($input: ImportCustomerInput!) {
1411
+ importCustomer: importOneCustomer(input: $input) {
1412
+ ...CustomerFragment
1413
+ }
1399
1414
  }
1400
- }
1401
- ${exports.CustomerFragmentDoc}`;
1415
+ ${exports.CustomerFragmentDoc}
1416
+ `;
1402
1417
  exports.UpdateCustomerDocument = (0, graphql_tag_1.default) `
1403
- mutation updateCustomer($input: UpdateCustomerInput!) {
1404
- updateCustomer: updateOneCustomer(input: $input) {
1405
- ...CustomerFragment
1418
+ mutation updateCustomer($input: UpdateCustomerInput!) {
1419
+ updateCustomer: updateOneCustomer(input: $input) {
1420
+ ...CustomerFragment
1421
+ }
1406
1422
  }
1407
- }
1408
- ${exports.CustomerFragmentDoc}`;
1423
+ ${exports.CustomerFragmentDoc}
1424
+ `;
1409
1425
  exports.ProvisionSubscriptionDocument = (0, graphql_tag_1.default) `
1410
- mutation provisionSubscription($input: ProvisionSubscriptionInput!) {
1411
- provisionSubscriptionV2(input: $input) {
1412
- checkoutUrl
1413
- status
1414
- subscription {
1415
- ...SlimSubscriptionFragment
1426
+ mutation provisionSubscription($input: ProvisionSubscriptionInput!) {
1427
+ provisionSubscriptionV2(input: $input) {
1428
+ checkoutUrl
1429
+ status
1430
+ subscription {
1431
+ ...SlimSubscriptionFragment
1432
+ }
1416
1433
  }
1417
1434
  }
1418
- }
1419
- ${exports.SlimSubscriptionFragmentDoc}`;
1435
+ ${exports.SlimSubscriptionFragmentDoc}
1436
+ `;
1420
1437
  exports.UpdateSubscriptionDocument = (0, graphql_tag_1.default) `
1421
- mutation updateSubscription($input: UpdateSubscriptionInput!) {
1422
- updateSubscription: updateOneSubscription(input: $input) {
1423
- ...SlimSubscriptionFragment
1438
+ mutation updateSubscription($input: UpdateSubscriptionInput!) {
1439
+ updateSubscription: updateOneSubscription(input: $input) {
1440
+ ...SlimSubscriptionFragment
1441
+ }
1424
1442
  }
1425
- }
1426
- ${exports.SlimSubscriptionFragmentDoc}`;
1443
+ ${exports.SlimSubscriptionFragmentDoc}
1444
+ `;
1427
1445
  exports.CancelSubscriptionDocument = (0, graphql_tag_1.default) `
1428
- mutation cancelSubscription($input: SubscriptionCancellationInput!) {
1429
- cancelSubscription(input: $input) {
1430
- ...SlimSubscriptionFragment
1446
+ mutation cancelSubscription($input: SubscriptionCancellationInput!) {
1447
+ cancelSubscription(input: $input) {
1448
+ ...SlimSubscriptionFragment
1449
+ }
1431
1450
  }
1432
- }
1433
- ${exports.SlimSubscriptionFragmentDoc}`;
1451
+ ${exports.SlimSubscriptionFragmentDoc}
1452
+ `;
1434
1453
  exports.InitiateCheckoutDocument = (0, graphql_tag_1.default) `
1435
- mutation initiateCheckout($input: InitiateCheckoutInput!) {
1436
- initiateCheckout(input: $input) {
1437
- checkoutUrl
1438
- checkoutBillingId
1454
+ mutation initiateCheckout($input: InitiateCheckoutInput!) {
1455
+ initiateCheckout(input: $input) {
1456
+ checkoutUrl
1457
+ checkoutBillingId
1458
+ }
1439
1459
  }
1440
- }
1441
- `;
1460
+ `;
1442
1461
  exports.EstimateSubscriptionDocument = (0, graphql_tag_1.default) `
1443
- mutation estimateSubscription($input: EstimateSubscriptionInput!) {
1444
- estimateSubscription(input: $input) {
1445
- ...SubscriptionPreviewFragment
1462
+ mutation estimateSubscription($input: EstimateSubscriptionInput!) {
1463
+ estimateSubscription(input: $input) {
1464
+ ...SubscriptionPreviewFragment
1465
+ }
1446
1466
  }
1447
- }
1448
- ${exports.SubscriptionPreviewFragmentDoc}`;
1467
+ ${exports.SubscriptionPreviewFragmentDoc}
1468
+ `;
1449
1469
  exports.EstimateSubscriptionUpdateDocument = (0, graphql_tag_1.default) `
1450
- mutation estimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) {
1451
- estimateSubscriptionUpdate(input: $input) {
1452
- ...SubscriptionPreviewFragment
1470
+ mutation estimateSubscriptionUpdate(
1471
+ $input: EstimateSubscriptionUpdateInput!
1472
+ ) {
1473
+ estimateSubscriptionUpdate(input: $input) {
1474
+ ...SubscriptionPreviewFragment
1475
+ }
1453
1476
  }
1454
- }
1455
- ${exports.SubscriptionPreviewFragmentDoc}`;
1477
+ ${exports.SubscriptionPreviewFragmentDoc}
1478
+ `;
1456
1479
  exports.ReportUsageDocument = (0, graphql_tag_1.default) `
1457
- mutation reportUsage($input: UsageMeasurementCreateInput!) {
1458
- createUsageMeasurement(usageMeasurement: $input) {
1459
- id
1480
+ mutation reportUsage($input: UsageMeasurementCreateInput!) {
1481
+ createUsageMeasurement(usageMeasurement: $input) {
1482
+ id
1483
+ }
1460
1484
  }
1461
- }
1462
- `;
1485
+ `;
1463
1486
  exports.GetCustomerByIdDocument = (0, graphql_tag_1.default) `
1464
- query getCustomerById($input: GetCustomerByRefIdInput!) {
1465
- getCustomerByRefId(input: $input) {
1466
- ...CustomerFragment
1487
+ query getCustomerById($input: GetCustomerByRefIdInput!) {
1488
+ getCustomerByRefId(input: $input) {
1489
+ ...CustomerFragment
1490
+ }
1467
1491
  }
1468
- }
1469
- ${exports.CustomerFragmentDoc}`;
1492
+ ${exports.CustomerFragmentDoc}
1493
+ `;
1470
1494
  exports.GetCouponsDocument = (0, graphql_tag_1.default) `
1471
- query getCoupons {
1472
- coupons(filter: {status: {eq: ACTIVE}}, paging: {first: 50}) {
1473
- edges {
1474
- node {
1475
- ...CouponFragment
1495
+ query getCoupons {
1496
+ coupons(filter: { status: { eq: ACTIVE } }, paging: { first: 50 }) {
1497
+ edges {
1498
+ node {
1499
+ ...CouponFragment
1500
+ }
1476
1501
  }
1477
1502
  }
1478
1503
  }
1479
- }
1480
- ${exports.CouponFragmentDoc}`;
1504
+ ${exports.CouponFragmentDoc}
1505
+ `;
1481
1506
  exports.GetPaywallDocument = (0, graphql_tag_1.default) `
1482
- query getPaywall($input: GetPaywallInput!) {
1483
- paywall(input: $input) {
1484
- plans {
1485
- ...PlanFragment
1486
- }
1487
- configuration {
1488
- ...PaywallConfigurationFragment
1489
- }
1490
- customer {
1491
- ...CustomerFragment
1507
+ query getPaywall($input: GetPaywallInput!) {
1508
+ paywall(input: $input) {
1509
+ plans {
1510
+ ...PlanFragment
1511
+ }
1512
+ configuration {
1513
+ ...PaywallConfigurationFragment
1514
+ }
1515
+ customer {
1516
+ ...CustomerFragment
1517
+ }
1492
1518
  }
1493
1519
  }
1494
- }
1495
- ${exports.PlanFragmentDoc}
1496
- ${exports.PaywallConfigurationFragmentDoc}
1497
- ${exports.CustomerFragmentDoc}`;
1520
+ ${exports.PlanFragmentDoc}
1521
+ ${exports.PaywallConfigurationFragmentDoc}
1522
+ ${exports.CustomerFragmentDoc}
1523
+ `;
1498
1524
  exports.GetEntitlementsDocument = (0, graphql_tag_1.default) `
1499
- query getEntitlements($query: FetchEntitlementsQuery!) {
1500
- entitlements: cachedEntitlements(query: $query) {
1501
- ...EntitlementFragment
1525
+ query getEntitlements($query: FetchEntitlementsQuery!) {
1526
+ entitlements: cachedEntitlements(query: $query) {
1527
+ ...EntitlementFragment
1528
+ }
1502
1529
  }
1503
- }
1504
- ${exports.EntitlementFragmentDoc}`;
1530
+ ${exports.EntitlementFragmentDoc}
1531
+ `;
1505
1532
  exports.GetEntitlementDocument = (0, graphql_tag_1.default) `
1506
- query getEntitlement($query: FetchEntitlementQuery!) {
1507
- entitlement(query: $query) {
1508
- ...EntitlementFragment
1533
+ query getEntitlement($query: FetchEntitlementQuery!) {
1534
+ entitlement(query: $query) {
1535
+ ...EntitlementFragment
1536
+ }
1509
1537
  }
1510
- }
1511
- ${exports.EntitlementFragmentDoc}`;
1538
+ ${exports.EntitlementFragmentDoc}
1539
+ `;
1512
1540
  const defaultWrapper = (action, _operationName, _operationType) => action();
1513
1541
  function getSdk(client, withWrapper = defaultWrapper) {
1514
1542
  return {
@@ -1556,7 +1584,7 @@ function getSdk(client, withWrapper = defaultWrapper) {
1556
1584
  },
1557
1585
  getEntitlement(variables, requestHeaders) {
1558
1586
  return withWrapper((wrappedRequestHeaders) => client.request(exports.GetEntitlementDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getEntitlement', 'query');
1559
- }
1587
+ },
1560
1588
  };
1561
1589
  }
1562
1590
  exports.getSdk = getSdk;