@stigg/node-server-sdk 0.39.0 → 0.41.1

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.
@@ -0,0 +1,2 @@
1
+ export declare const COUPON_FRAGMENT: import("graphql/language/ast").DocumentNode;
2
+ export declare const FETCH_COUPONS: import("graphql/language/ast").DocumentNode;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FETCH_COUPONS = exports.COUPON_FRAGMENT = void 0;
4
+ const core_1 = require("@apollo/client/core");
5
+ exports.COUPON_FRAGMENT = (0, core_1.gql) `
6
+ fragment CouponFragment on Coupon {
7
+ id
8
+ discountValue
9
+ type
10
+ additionalMetaData
11
+ refId
12
+ name
13
+ description
14
+ createdAt
15
+ updatedAt
16
+ billingId
17
+ billingLinkUrl
18
+ type
19
+ status
20
+ syncStates {
21
+ vendorIdentifier
22
+ status
23
+ }
24
+ customers {
25
+ id
26
+ }
27
+ }
28
+ `;
29
+ exports.FETCH_COUPONS = (0, core_1.gql) `
30
+ ${exports.COUPON_FRAGMENT}
31
+ query FetchCoupons($filter: CouponFilter, $sorting: [CouponSort!], $paging: CursorPaging) {
32
+ coupons(filter: $filter, sorting: $sorting, paging: $paging) {
33
+ edges {
34
+ node {
35
+ ...CouponFragment
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `;
41
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291cG9uc0ZyYWdtZW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hcGkvY291cG9uc0ZyYWdtZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw4Q0FBMEM7QUFFN0IsUUFBQSxlQUFlLEdBQUcsSUFBQSxVQUFHLEVBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBdUJqQyxDQUFDO0FBRVcsUUFBQSxhQUFhLEdBQUcsSUFBQSxVQUFHLEVBQUE7SUFDNUIsdUJBQWU7Ozs7Ozs7Ozs7Q0FVbEIsQ0FBQyJ9
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CUSTOMER_FRAGMENT = exports.PROMOTIONAL_ENTITLEMENT_FRAGMENT = exports.SUBSCRIPTION_FRAGMENT = exports.PRICE_FRAGMENT = void 0;
4
4
  const core_1 = require("@apollo/client/core");
5
+ const couponsFragments_1 = require("./couponsFragments");
5
6
  exports.PRICE_FRAGMENT = (0, core_1.gql) `
6
7
  fragment PriceFragment on Price {
7
8
  billingModel
@@ -17,6 +18,18 @@ exports.PRICE_FRAGMENT = (0, core_1.gql) `
17
18
  }
18
19
  }
19
20
  `;
21
+ const TOTAL_PRICE_FRAGMENT = (0, core_1.gql) `
22
+ fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
23
+ subTotal {
24
+ amount
25
+ currency
26
+ }
27
+ total {
28
+ amount
29
+ currency
30
+ }
31
+ }
32
+ `;
20
33
  const PACKAGE_ENTITLEMENT_FRAGMENT = (0, core_1.gql) `
21
34
  fragment PackageEntitlementFragment on PackageEntitlement {
22
35
  usageLimit
@@ -104,6 +117,9 @@ exports.SUBSCRIPTION_FRAGMENT = (0, core_1.gql) `
104
117
  ...PriceFragment
105
118
  }
106
119
  }
120
+ totalPrice {
121
+ ...TotalPriceFragment
122
+ }
107
123
  pricingType
108
124
  plan {
109
125
  ...PlanFragment
@@ -119,6 +135,7 @@ exports.SUBSCRIPTION_FRAGMENT = (0, core_1.gql) `
119
135
  ${PLAN_FRAGMENT}
120
136
  ${ADDON_FRAGMENT}
121
137
  ${exports.PRICE_FRAGMENT}
138
+ ${TOTAL_PRICE_FRAGMENT}
122
139
  `;
123
140
  exports.PROMOTIONAL_ENTITLEMENT_FRAGMENT = (0, core_1.gql) `
124
141
  fragment PromotionalEntitlementFragment on PromotionalEntitlement {
@@ -151,6 +168,9 @@ exports.CUSTOMER_FRAGMENT = (0, core_1.gql) `
151
168
  refId
152
169
  billingId
153
170
  additionalMetaData
171
+ coupon {
172
+ ...CouponFragment
173
+ }
154
174
  promotionalEntitlements {
155
175
  ...PromotionalEntitlementFragment
156
176
  }
@@ -158,7 +178,8 @@ exports.CUSTOMER_FRAGMENT = (0, core_1.gql) `
158
178
  ...SubscriptionFragment
159
179
  }
160
180
  }
181
+ ${couponsFragments_1.COUPON_FRAGMENT}
161
182
  ${exports.SUBSCRIPTION_FRAGMENT}
162
183
  ${exports.PROMOTIONAL_ENTITLEMENT_FRAGMENT}
163
184
  `;
164
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tZXJGcmFnbWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBpL2N1c3RvbWVyRnJhZ21lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDhDQUEwQztBQUU3QixRQUFBLGNBQWMsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7Q0FjaEMsQ0FBQztBQUVGLE1BQU0sNEJBQTRCLEdBQUcsSUFBQSxVQUFHLEVBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FnQnZDLENBQUM7QUFFRixNQUFNLGNBQWMsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7O0NBWXpCLENBQUM7QUFFRixNQUFNLGFBQWEsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7SUFtQ3JCLDRCQUE0QjtJQUM1QixzQkFBYztJQUNkLGNBQWM7Q0FDakIsQ0FBQztBQUVXLFFBQUEscUJBQXFCLEdBQUcsSUFBQSxVQUFHLEVBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQThCcEMsYUFBYTtJQUNiLGNBQWM7SUFDZCxzQkFBYztDQUNqQixDQUFDO0FBRVcsUUFBQSxnQ0FBZ0MsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQW1CbEQsQ0FBQztBQUVXLFFBQUEsaUJBQWlCLEdBQUcsSUFBQSxVQUFHLEVBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQWtCaEMsNkJBQXFCO0lBQ3JCLHdDQUFnQztDQUNuQyxDQUFDIn0=
185
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tZXJGcmFnbWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBpL2N1c3RvbWVyRnJhZ21lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDhDQUEwQztBQUMxQyx5REFBb0U7QUFFdkQsUUFBQSxjQUFjLEdBQUcsSUFBQSxVQUFHLEVBQUE7Ozs7Ozs7Ozs7Ozs7O0NBY2hDLENBQUM7QUFFRixNQUFNLG9CQUFvQixHQUFHLElBQUEsVUFBRyxFQUFBOzs7Ozs7Ozs7OztDQVcvQixDQUFDO0FBRUYsTUFBTSw0QkFBNEIsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7OztDQWdCdkMsQ0FBQztBQUVGLE1BQU0sY0FBYyxHQUFHLElBQUEsVUFBRyxFQUFBOzs7Ozs7Ozs7Ozs7Q0FZekIsQ0FBQztBQUVGLE1BQU0sYUFBYSxHQUFHLElBQUEsVUFBRyxFQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztJQW1DckIsNEJBQTRCO0lBQzVCLHNCQUFjO0lBQ2QsY0FBYztDQUNqQixDQUFDO0FBRVcsUUFBQSxxQkFBcUIsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBaUNwQyxhQUFhO0lBQ2IsY0FBYztJQUNkLHNCQUFjO0lBQ2Qsb0JBQW9CO0NBQ3ZCLENBQUM7QUFFVyxRQUFBLGdDQUFnQyxHQUFHLElBQUEsVUFBRyxFQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBbUJsRCxDQUFDO0FBRVcsUUFBQSxpQkFBaUIsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBcUJoQyxrQ0FBZTtJQUNmLDZCQUFxQjtJQUNyQix3Q0FBZ0M7Q0FDbkMsQ0FBQyJ9
@@ -40,6 +40,7 @@ export declare type AddCompatibleAddonsToPlanInput = {
40
40
  relationIds: Array<Scalars['String']>;
41
41
  };
42
42
  export declare type AddonCreateInput = {
43
+ additionalMetaData?: Maybe<Scalars['JSON']>;
43
44
  billingId?: Maybe<Scalars['String']>;
44
45
  description?: Maybe<Scalars['String']>;
45
46
  displayName: Scalars['String'];
@@ -119,10 +120,20 @@ export declare enum ApiKeyType {
119
120
  Client = "CLIENT",
120
121
  Server = "SERVER"
121
122
  }
123
+ export declare type ArchiveCouponInput = {
124
+ environmentId?: Maybe<Scalars['String']>;
125
+ refId: Scalars['String'];
126
+ };
122
127
  export declare type ArchivePlanInput = {
123
128
  environmentId: Scalars['String'];
124
129
  id: Scalars['String'];
125
130
  };
131
+ export declare type AttachCustomerPaymentMethodInput = {
132
+ environmentId?: Maybe<Scalars['String']>;
133
+ paymentMethodId: Scalars['String'];
134
+ refId: Scalars['String'];
135
+ vendorIdentifier: VendorIdentifier;
136
+ };
126
137
  /** Billing model. */
127
138
  export declare enum BillingModel {
128
139
  FlatFee = "FLAT_FEE",
@@ -175,6 +186,104 @@ export declare enum ChangeType {
175
186
  Deleted = "DELETED",
176
187
  Modified = "MODIFIED"
177
188
  }
189
+ export declare type CouponFilter = {
190
+ and?: Maybe<Array<CouponFilter>>;
191
+ billingId?: Maybe<StringFieldComparison>;
192
+ createdAt?: Maybe<DateFieldComparison>;
193
+ customers?: Maybe<CouponFilterCustomerFilter>;
194
+ description?: Maybe<StringFieldComparison>;
195
+ environmentId?: Maybe<StringFieldComparison>;
196
+ id?: Maybe<StringFieldComparison>;
197
+ name?: Maybe<StringFieldComparison>;
198
+ or?: Maybe<Array<CouponFilter>>;
199
+ refId?: Maybe<StringFieldComparison>;
200
+ status?: Maybe<CouponStatusFilterComparison>;
201
+ type?: Maybe<CouponTypeFilterComparison>;
202
+ updatedAt?: Maybe<DateFieldComparison>;
203
+ };
204
+ export declare type CouponFilterCustomerFilter = {
205
+ and?: Maybe<Array<CouponFilterCustomerFilter>>;
206
+ billingId?: Maybe<StringFieldComparison>;
207
+ createdAt?: Maybe<DateFieldComparison>;
208
+ crmHubspotCompanyId?: Maybe<StringFieldComparison>;
209
+ crmHubspotCompanyUrl?: Maybe<StringFieldComparison>;
210
+ crmId?: Maybe<StringFieldComparison>;
211
+ email?: Maybe<StringFieldComparison>;
212
+ environmentId?: Maybe<StringFieldComparison>;
213
+ id?: Maybe<StringFieldComparison>;
214
+ name?: Maybe<StringFieldComparison>;
215
+ or?: Maybe<Array<CouponFilterCustomerFilter>>;
216
+ refId?: Maybe<StringFieldComparison>;
217
+ updatedAt?: Maybe<DateFieldComparison>;
218
+ };
219
+ export declare type CouponSort = {
220
+ direction: SortDirection;
221
+ field: CouponSortFields;
222
+ nulls?: Maybe<SortNulls>;
223
+ };
224
+ export declare enum CouponSortFields {
225
+ BillingId = "billingId",
226
+ CreatedAt = "createdAt",
227
+ Description = "description",
228
+ EnvironmentId = "environmentId",
229
+ Id = "id",
230
+ Name = "name",
231
+ RefId = "refId",
232
+ Status = "status",
233
+ Type = "type",
234
+ UpdatedAt = "updatedAt"
235
+ }
236
+ /** The status of the coupon */
237
+ export declare enum CouponStatus {
238
+ Active = "ACTIVE",
239
+ Archived = "ARCHIVED"
240
+ }
241
+ export declare type CouponStatusFilterComparison = {
242
+ eq?: Maybe<CouponStatus>;
243
+ gt?: Maybe<CouponStatus>;
244
+ gte?: Maybe<CouponStatus>;
245
+ iLike?: Maybe<CouponStatus>;
246
+ in?: Maybe<Array<CouponStatus>>;
247
+ is?: Maybe<Scalars['Boolean']>;
248
+ isNot?: Maybe<Scalars['Boolean']>;
249
+ like?: Maybe<CouponStatus>;
250
+ lt?: Maybe<CouponStatus>;
251
+ lte?: Maybe<CouponStatus>;
252
+ neq?: Maybe<CouponStatus>;
253
+ notILike?: Maybe<CouponStatus>;
254
+ notIn?: Maybe<Array<CouponStatus>>;
255
+ notLike?: Maybe<CouponStatus>;
256
+ };
257
+ /** The type of the coupon */
258
+ export declare enum CouponType {
259
+ Fixed = "FIXED",
260
+ Percentage = "PERCENTAGE"
261
+ }
262
+ export declare type CouponTypeFilterComparison = {
263
+ eq?: Maybe<CouponType>;
264
+ gt?: Maybe<CouponType>;
265
+ gte?: Maybe<CouponType>;
266
+ iLike?: Maybe<CouponType>;
267
+ in?: Maybe<Array<CouponType>>;
268
+ is?: Maybe<Scalars['Boolean']>;
269
+ isNot?: Maybe<Scalars['Boolean']>;
270
+ like?: Maybe<CouponType>;
271
+ lt?: Maybe<CouponType>;
272
+ lte?: Maybe<CouponType>;
273
+ neq?: Maybe<CouponType>;
274
+ notILike?: Maybe<CouponType>;
275
+ notIn?: Maybe<Array<CouponType>>;
276
+ notLike?: Maybe<CouponType>;
277
+ };
278
+ export declare type CreateCouponInput = {
279
+ additionalMetaData?: Maybe<Scalars['JSON']>;
280
+ description?: Maybe<Scalars['String']>;
281
+ discountValue: Scalars['Float'];
282
+ environmentId: Scalars['String'];
283
+ name: Scalars['String'];
284
+ refId: Scalars['String'];
285
+ type: CouponType;
286
+ };
178
287
  export declare type CreateEnvironment = {
179
288
  createdAt?: Maybe<Scalars['DateTime']>;
180
289
  description?: Maybe<Scalars['String']>;
@@ -298,6 +407,7 @@ export declare type CustomerInput = {
298
407
  additionalMetaData?: Maybe<Scalars['JSON']>;
299
408
  billingId?: Maybe<Scalars['String']>;
300
409
  billingInformation?: Maybe<CustomerBillingInfo>;
410
+ couponRefId?: Maybe<Scalars['String']>;
301
411
  crmId?: Maybe<Scalars['String']>;
302
412
  email?: Maybe<Scalars['String']>;
303
413
  environmentId?: Maybe<Scalars['String']>;
@@ -497,6 +607,10 @@ export declare enum EntitlementResetPeriod {
497
607
  Month = "MONTH",
498
608
  Week = "WEEK"
499
609
  }
610
+ export declare enum EntitySelectionMode {
611
+ BlackList = "BLACK_LIST",
612
+ WhiteList = "WHITE_LIST"
613
+ }
500
614
  export declare type EnvironmentFilter = {
501
615
  and?: Maybe<Array<EnvironmentFilter>>;
502
616
  createdAt?: Maybe<DateFieldComparison>;
@@ -518,11 +632,15 @@ export declare enum EnvironmentSortFields {
518
632
  }
519
633
  /** error codes */
520
634
  export declare enum ErrorCode {
635
+ AddonHasToHavePriceError = "AddonHasToHavePriceError",
521
636
  AddonNotFound = "AddonNotFound",
637
+ ArchivedCouponCantBeApplied = "ArchivedCouponCantBeApplied",
522
638
  BadUserInput = "BadUserInput",
523
639
  BillingPeriodMissingError = "BillingPeriodMissingError",
524
640
  CheckoutIsNotSupported = "CheckoutIsNotSupported",
641
+ CouponNotFound = "CouponNotFound",
525
642
  CustomerHasNoPaymentMethod = "CustomerHasNoPaymentMethod",
643
+ CustomerNoBillingId = "CustomerNoBillingId",
526
644
  CustomerNotFound = "CustomerNotFound",
527
645
  DraftPlanCantBeArchived = "DraftPlanCantBeArchived",
528
646
  DuplicatedEntityNotAllowed = "DuplicatedEntityNotAllowed",
@@ -531,6 +649,8 @@ export declare enum ErrorCode {
531
649
  FailedToImportCustomer = "FailedToImportCustomer",
532
650
  FeatureNotFound = "FeatureNotFound",
533
651
  IdentityForbidden = "IdentityForbidden",
652
+ ImportAlreadyInProgress = "ImportAlreadyInProgress",
653
+ InitStripePaymentMethodError = "InitStripePaymentMethodError",
534
654
  IntegrationNotFound = "IntegrationNotFound",
535
655
  IntegrityViolation = "IntegrityViolation",
536
656
  InvalidAddressError = "InvalidAddressError",
@@ -554,6 +674,8 @@ export declare enum ErrorCode {
554
674
  PriceNotFound = "PriceNotFound",
555
675
  RateLimitExceeded = "RateLimitExceeded",
556
676
  ResyncAlreadyInProgress = "ResyncAlreadyInProgress",
677
+ SelectedBillingModelDoesntMatchImportedItemError = "SelectedBillingModelDoesntMatchImportedItemError",
678
+ StripeCustomerIsDeleted = "StripeCustomerIsDeleted",
557
679
  SubscriptionAlreadyCanceledOrExpired = "SubscriptionAlreadyCanceledOrExpired",
558
680
  SubscriptionMustHaveSinglePlanError = "SubscriptionMustHaveSinglePlanError",
559
681
  SubscriptionNotFound = "SubscriptionNotFound",
@@ -572,6 +694,9 @@ export declare enum EventLogType {
572
694
  AddonCreated = "ADDON_CREATED",
573
695
  AddonDeleted = "ADDON_DELETED",
574
696
  AddonUpdated = "ADDON_UPDATED",
697
+ CouponArchived = "COUPON_ARCHIVED",
698
+ CouponCreated = "COUPON_CREATED",
699
+ CouponUpdated = "COUPON_UPDATED",
575
700
  CustomerCreated = "CUSTOMER_CREATED",
576
701
  CustomerDeleted = "CUSTOMER_DELETED",
577
702
  CustomerUpdated = "CUSTOMER_UPDATED",
@@ -582,6 +707,8 @@ export declare enum EventLogType {
582
707
  FeatureCreated = "FEATURE_CREATED",
583
708
  FeatureDeleted = "FEATURE_DELETED",
584
709
  FeatureUpdated = "FEATURE_UPDATED",
710
+ ImportIntegrationCatalogTriggered = "IMPORT_INTEGRATION_CATALOG_TRIGGERED",
711
+ ImportIntegrationCustomersTriggered = "IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",
585
712
  MeasurementReported = "MEASUREMENT_REPORTED",
586
713
  PackagePublished = "PACKAGE_PUBLISHED",
587
714
  PlanCreated = "PLAN_CREATED",
@@ -599,7 +726,8 @@ export declare enum EventLogType {
599
726
  SubscriptionTrialEndsSoon = "SUBSCRIPTION_TRIAL_ENDS_SOON",
600
727
  SubscriptionTrialExpired = "SUBSCRIPTION_TRIAL_EXPIRED",
601
728
  SubscriptionTrialStarted = "SUBSCRIPTION_TRIAL_STARTED",
602
- SubscriptionUpdated = "SUBSCRIPTION_UPDATED"
729
+ SubscriptionUpdated = "SUBSCRIPTION_UPDATED",
730
+ SubscriptionUsageUpdated = "SUBSCRIPTION_USAGE_UPDATED"
603
731
  }
604
732
  export declare type FeatureFilter = {
605
733
  and?: Maybe<Array<FeatureFilter>>;
@@ -754,6 +882,51 @@ export declare type ImportCustomerInput = {
754
882
  name?: Maybe<Scalars['String']>;
755
883
  refId: Scalars['String'];
756
884
  };
885
+ export declare type ImportIntegrationCatalogInput = {
886
+ billingModel?: Maybe<BillingModel>;
887
+ entitySelectionMode: EntitySelectionMode;
888
+ environmentId: Scalars['String'];
889
+ featureUnitName?: Maybe<Scalars['String']>;
890
+ featureUnitPluralName?: Maybe<Scalars['String']>;
891
+ plansSelectionBlacklist?: Maybe<Array<Scalars['String']>>;
892
+ plansSelectionWhitelist?: Maybe<Array<Scalars['String']>>;
893
+ productId: Scalars['String'];
894
+ selectedAddonBillingIds: Array<Scalars['String']>;
895
+ vendorIdentifier: VendorIdentifier;
896
+ };
897
+ export declare type ImportIntegrationCustomersInput = {
898
+ customersSelectionBlacklist?: Maybe<Array<Scalars['String']>>;
899
+ customersSelectionWhitelist?: Maybe<Array<Scalars['String']>>;
900
+ entitySelectionMode: EntitySelectionMode;
901
+ environmentId: Scalars['String'];
902
+ productId: Scalars['String'];
903
+ vendorIdentifier: VendorIdentifier;
904
+ };
905
+ export declare type ImportIntegrationTaskFilter = {
906
+ and?: Maybe<Array<ImportIntegrationTaskFilter>>;
907
+ createdAt?: Maybe<DateFieldComparison>;
908
+ environmentId?: Maybe<StringFieldComparison>;
909
+ id?: Maybe<StringFieldComparison>;
910
+ or?: Maybe<Array<ImportIntegrationTaskFilter>>;
911
+ status?: Maybe<TaskStatusFilterComparison>;
912
+ taskType?: Maybe<TaskTypeFilterComparison>;
913
+ };
914
+ export declare type ImportIntegrationTaskSort = {
915
+ direction: SortDirection;
916
+ field: ImportIntegrationTaskSortFields;
917
+ nulls?: Maybe<SortNulls>;
918
+ };
919
+ export declare enum ImportIntegrationTaskSortFields {
920
+ CreatedAt = "createdAt",
921
+ EnvironmentId = "environmentId",
922
+ Id = "id",
923
+ Status = "status",
924
+ TaskType = "taskType"
925
+ }
926
+ export declare type InitAddStripeCustomerPaymentMethodInput = {
927
+ customerRefId: Scalars['String'];
928
+ environmentId?: Maybe<Scalars['String']>;
929
+ };
757
930
  export declare type InitiateCheckoutInput = {
758
931
  addons?: Maybe<Array<SubscriptionAddonInput>>;
759
932
  billingPeriod: BillingPeriod;
@@ -1014,7 +1187,13 @@ export declare type PackageStatusFilterComparison = {
1014
1187
  notIn?: Maybe<Array<PackageStatus>>;
1015
1188
  notLike?: Maybe<PackageStatus>;
1016
1189
  };
1190
+ /** Type of a payment method */
1191
+ export declare enum PaymentMethodType {
1192
+ Bank = "BANK",
1193
+ Card = "CARD"
1194
+ }
1017
1195
  export declare type PlanCreateInput = {
1196
+ additionalMetaData?: Maybe<Scalars['JSON']>;
1018
1197
  billingId?: Maybe<Scalars['String']>;
1019
1198
  description?: Maybe<Scalars['String']>;
1020
1199
  displayName: Scalars['String'];
@@ -1171,6 +1350,7 @@ export declare type PricingTypeFilterComparison = {
1171
1350
  notLike?: Maybe<PricingType>;
1172
1351
  };
1173
1352
  export declare type ProductCreateInput = {
1353
+ additionalMetaData?: Maybe<Scalars['JSON']>;
1174
1354
  description?: Maybe<Scalars['String']>;
1175
1355
  displayName?: Maybe<Scalars['String']>;
1176
1356
  environmentId: Scalars['String'];
@@ -1308,6 +1488,12 @@ export declare type RemoveCompatibleAddonsFromPlanInput = {
1308
1488
  /** The ids of the relations. */
1309
1489
  relationIds: Array<Scalars['String']>;
1310
1490
  };
1491
+ export declare type RemoveCouponFromCustomerInput = {
1492
+ /** The id of the record. */
1493
+ id: Scalars['String'];
1494
+ /** The id of relation. */
1495
+ relationId: Scalars['String'];
1496
+ };
1311
1497
  export declare type ResyncIntegrationInput = {
1312
1498
  environmentId: Scalars['String'];
1313
1499
  vendorIdentifier: VendorIdentifier;
@@ -1324,6 +1510,12 @@ export declare type SetCompatibleAddonsOnPlanInput = {
1324
1510
  /** The ids of the relations. */
1325
1511
  relationIds: Array<Scalars['String']>;
1326
1512
  };
1513
+ export declare type SetCouponOnCustomerInput = {
1514
+ /** The id of the record. */
1515
+ id: Scalars['String'];
1516
+ /** The id of relation. */
1517
+ relationId: Scalars['String'];
1518
+ };
1327
1519
  /** Sort Directions */
1328
1520
  export declare enum SortDirection {
1329
1521
  Asc = "ASC",
@@ -1355,6 +1547,20 @@ export declare type StripeCredentialsInput = {
1355
1547
  authorizationCode: Scalars['String'];
1356
1548
  isTestMode: Scalars['Boolean'];
1357
1549
  };
1550
+ export declare type StripeCustomerSearchInput = {
1551
+ customerName?: Maybe<Scalars['String']>;
1552
+ environmentId: Scalars['String'];
1553
+ nextPage?: Maybe<Scalars['String']>;
1554
+ };
1555
+ export declare type StripeProductSearchInput = {
1556
+ environmentId: Scalars['String'];
1557
+ nextPage?: Maybe<Scalars['String']>;
1558
+ productName?: Maybe<Scalars['String']>;
1559
+ };
1560
+ export declare type StripeSubscriptionSearchInput = {
1561
+ environmentId: Scalars['String'];
1562
+ nextPage?: Maybe<Scalars['String']>;
1563
+ };
1358
1564
  export declare type SubscriptionAddonFilter = {
1359
1565
  addon?: Maybe<SubscriptionAddonFilterAddonFilter>;
1360
1566
  and?: Maybe<Array<SubscriptionAddonFilter>>;
@@ -1477,6 +1683,7 @@ export declare enum SubscriptionEndSetup {
1477
1683
  export declare type SubscriptionInput = {
1478
1684
  additionalMetaData?: Maybe<Scalars['JSON']>;
1479
1685
  addons?: Maybe<Array<SubscriptionAddonInput>>;
1686
+ awaitPaymentConfirmation?: Maybe<Scalars['Boolean']>;
1480
1687
  billingId?: Maybe<Scalars['String']>;
1481
1688
  billingPeriod?: Maybe<BillingPeriod>;
1482
1689
  crmId?: Maybe<Scalars['String']>;
@@ -1589,11 +1796,18 @@ export declare type SubscriptionStatusFilterComparison = {
1589
1796
  notIn?: Maybe<Array<SubscriptionStatus>>;
1590
1797
  notLike?: Maybe<SubscriptionStatus>;
1591
1798
  };
1799
+ /** Status of the integration sync */
1800
+ export declare enum SyncStatus {
1801
+ Error = "ERROR",
1802
+ NoSyncRequired = "NO_SYNC_REQUIRED",
1803
+ Pending = "PENDING",
1804
+ Success = "SUCCESS"
1805
+ }
1592
1806
  export declare enum TaskStatus {
1593
1807
  Completed = "COMPLETED",
1594
1808
  Failed = "FAILED",
1595
1809
  InProgress = "IN_PROGRESS",
1596
- PartiallyCompleted = "PARTIALLY_COMPLETED",
1810
+ PartiallyFailed = "PARTIALLY_FAILED",
1597
1811
  Pending = "PENDING"
1598
1812
  }
1599
1813
  export declare type TaskStatusFilterComparison = {
@@ -1613,6 +1827,8 @@ export declare type TaskStatusFilterComparison = {
1613
1827
  notLike?: Maybe<TaskStatus>;
1614
1828
  };
1615
1829
  export declare enum TaskType {
1830
+ ImportIntegrationCatalog = "IMPORT_INTEGRATION_CATALOG",
1831
+ ImportIntegrationCustomers = "IMPORT_INTEGRATION_CUSTOMERS",
1616
1832
  ResyncIntegration = "RESYNC_INTEGRATION",
1617
1833
  SubscriptionMigration = "SUBSCRIPTION_MIGRATION"
1618
1834
  }
@@ -1645,10 +1861,23 @@ export declare enum TrialPeriodUnits {
1645
1861
  Day = "DAY",
1646
1862
  Month = "MONTH"
1647
1863
  }
1864
+ export declare type UpdateAccountInput = {
1865
+ displayName: Scalars['String'];
1866
+ id: Scalars['String'];
1867
+ timezone?: Maybe<Scalars['String']>;
1868
+ };
1869
+ export declare type UpdateCouponInput = {
1870
+ additionalMetaData?: Maybe<Scalars['JSON']>;
1871
+ description?: Maybe<Scalars['String']>;
1872
+ environmentId?: Maybe<Scalars['String']>;
1873
+ name: Scalars['String'];
1874
+ refId: Scalars['String'];
1875
+ };
1648
1876
  export declare type UpdateCustomerInput = {
1649
1877
  additionalMetaData?: Maybe<Scalars['JSON']>;
1650
1878
  billingId?: Maybe<Scalars['String']>;
1651
1879
  billingInformation?: Maybe<CustomerBillingInfo>;
1880
+ couponRefId?: Maybe<Scalars['String']>;
1652
1881
  crmId?: Maybe<Scalars['String']>;
1653
1882
  email?: Maybe<Scalars['String']>;
1654
1883
  environmentId?: Maybe<Scalars['String']>;
@@ -1850,6 +2079,47 @@ export declare type GetEnvironmentQuery = {
1850
2079
  __typename?: 'Query';
1851
2080
  currentEnvironment: string;
1852
2081
  };
2082
+ export declare type CouponFragment = {
2083
+ __typename?: 'Coupon';
2084
+ id: string;
2085
+ discountValue: number;
2086
+ type: CouponType;
2087
+ additionalMetaData?: any | null | undefined;
2088
+ refId: string;
2089
+ name: string;
2090
+ description?: string | null | undefined;
2091
+ createdAt: any;
2092
+ updatedAt: any;
2093
+ billingId?: string | null | undefined;
2094
+ billingLinkUrl?: string | null | undefined;
2095
+ status: CouponStatus;
2096
+ syncStates?: Array<{
2097
+ __typename?: 'SyncState';
2098
+ vendorIdentifier: VendorIdentifier;
2099
+ status: SyncStatus;
2100
+ }> | null | undefined;
2101
+ customers?: Array<{
2102
+ __typename?: 'Customer';
2103
+ id: string;
2104
+ }> | null | undefined;
2105
+ };
2106
+ export declare type FetchCouponsQueryVariables = Exact<{
2107
+ filter?: Maybe<CouponFilter>;
2108
+ sorting?: Maybe<Array<CouponSort> | CouponSort>;
2109
+ paging?: Maybe<CursorPaging>;
2110
+ }>;
2111
+ export declare type FetchCouponsQuery = {
2112
+ __typename?: 'Query';
2113
+ coupons: {
2114
+ __typename?: 'CouponConnection';
2115
+ edges: Array<{
2116
+ __typename?: 'CouponEdge';
2117
+ node: {
2118
+ __typename?: 'Coupon';
2119
+ } & CouponFragment;
2120
+ }>;
2121
+ };
2122
+ };
1853
2123
  export declare type PriceFragment = {
1854
2124
  __typename?: 'Price';
1855
2125
  billingModel: BillingModel;
@@ -1866,6 +2136,19 @@ export declare type PriceFragment = {
1866
2136
  displayName: string;
1867
2137
  } | null | undefined;
1868
2138
  };
2139
+ export declare type TotalPriceFragment = {
2140
+ __typename?: 'CustomerSubscriptionTotalPrice';
2141
+ subTotal: {
2142
+ __typename?: 'Money';
2143
+ amount: number;
2144
+ currency: Currency;
2145
+ };
2146
+ total: {
2147
+ __typename?: 'Money';
2148
+ amount: number;
2149
+ currency: Currency;
2150
+ };
2151
+ };
1869
2152
  export declare type PackageEntitlementFragment = {
1870
2153
  __typename?: 'PackageEntitlement';
1871
2154
  usageLimit?: number | null | undefined;
@@ -1953,6 +2236,9 @@ export declare type SubscriptionFragment = {
1953
2236
  __typename?: 'Price';
1954
2237
  } & PriceFragment;
1955
2238
  }> | null | undefined;
2239
+ totalPrice?: ({
2240
+ __typename?: 'CustomerSubscriptionTotalPrice';
2241
+ } & TotalPriceFragment) | null | undefined;
1956
2242
  plan: {
1957
2243
  __typename?: 'Plan';
1958
2244
  } & PlanFragment;
@@ -1996,6 +2282,9 @@ export declare type CustomerFragment = {
1996
2282
  refId: string;
1997
2283
  billingId?: string | null | undefined;
1998
2284
  additionalMetaData?: any | null | undefined;
2285
+ coupon?: ({
2286
+ __typename?: 'Coupon';
2287
+ } & CouponFragment) | null | undefined;
1999
2288
  promotionalEntitlements: Array<{
2000
2289
  __typename?: 'PromotionalEntitlement';
2001
2290
  } & PromotionalEntitlementFragment>;
@@ -2162,21 +2451,27 @@ export declare type CreateSubscriptionMutation = {
2162
2451
  __typename?: 'Mutation';
2163
2452
  createSubscription: {
2164
2453
  __typename?: 'CustomerSubscription';
2454
+ id: string;
2165
2455
  refId: string;
2456
+ status: SubscriptionStatus;
2166
2457
  additionalMetaData?: any | null | undefined;
2167
2458
  plan: {
2168
2459
  __typename?: 'Plan';
2460
+ id: string;
2169
2461
  refId: string;
2170
2462
  };
2171
2463
  addons?: Array<{
2172
2464
  __typename?: 'SubscriptionAddon';
2465
+ quantity: number;
2173
2466
  addon: {
2174
2467
  __typename?: 'Addon';
2468
+ id: string;
2175
2469
  refId: string;
2176
2470
  };
2177
2471
  }> | null | undefined;
2178
2472
  customer: {
2179
2473
  __typename?: 'Customer';
2474
+ id: string;
2180
2475
  refId: string;
2181
2476
  };
2182
2477
  };
@@ -2188,21 +2483,27 @@ export declare type CancelSubscriptionMutation = {
2188
2483
  __typename?: 'Mutation';
2189
2484
  cancelSubscription: {
2190
2485
  __typename?: 'CustomerSubscription';
2486
+ id: string;
2191
2487
  refId: string;
2488
+ status: SubscriptionStatus;
2192
2489
  additionalMetaData?: any | null | undefined;
2193
2490
  plan: {
2194
2491
  __typename?: 'Plan';
2492
+ id: string;
2195
2493
  refId: string;
2196
2494
  };
2197
2495
  addons?: Array<{
2198
2496
  __typename?: 'SubscriptionAddon';
2497
+ quantity: number;
2199
2498
  addon: {
2200
2499
  __typename?: 'Addon';
2500
+ id: string;
2201
2501
  refId: string;
2202
2502
  };
2203
2503
  }> | null | undefined;
2204
2504
  customer: {
2205
2505
  __typename?: 'Customer';
2506
+ id: string;
2206
2507
  refId: string;
2207
2508
  };
2208
2509
  };