@stigg/node-server-sdk 0.40.0 → 0.41.2
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/dist/api/couponsFragments.d.ts +2 -0
- package/dist/api/couponsFragments.js +41 -0
- package/dist/api/customerFragments.js +22 -1
- package/dist/api/entitlements/entitlementsApi.js +3 -3
- package/dist/api/generated/types.d.ts +287 -2
- package/dist/api/generated/types.js +72 -3
- package/dist/api/managementApi.d.ts +2 -1
- package/dist/api/managementApi.js +19 -2
- package/dist/client.d.ts +9 -3
- package/dist/client.js +16 -3
- package/dist/models.d.ts +14 -1
- package/dist/models.js +1 -1
- package/dist/utils/ModelMapper.d.ts +5 -2
- package/dist/utils/ModelMapper.js +35 -2
- package/package.json +2 -2
|
@@ -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_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ZCLENBQUM7QUFFVyxRQUFBLGdDQUFnQyxHQUFHLElBQUEsVUFBRyxFQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBbUJsRCxDQUFDO0FBRVcsUUFBQSxpQkFBaUIsR0FBRyxJQUFBLFVBQUcsRUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBcUJoQyxrQ0FBZTtJQUNmLDZCQUFxQjtJQUNyQix3Q0FBZ0M7Q0FDbkMsQ0FBQyJ9
|
|
@@ -17,7 +17,7 @@ class EntitlementsApi {
|
|
|
17
17
|
${entitlementsGql_1.ENTITLEMENT_FRAGMENT}
|
|
18
18
|
`,
|
|
19
19
|
variables: { query },
|
|
20
|
-
fetchPolicy: '
|
|
20
|
+
fetchPolicy: 'no-cache',
|
|
21
21
|
});
|
|
22
22
|
return entitlements;
|
|
23
23
|
}
|
|
@@ -31,7 +31,7 @@ class EntitlementsApi {
|
|
|
31
31
|
}
|
|
32
32
|
`,
|
|
33
33
|
variables: { usageMeasurement: data },
|
|
34
|
-
fetchPolicy: '
|
|
34
|
+
fetchPolicy: 'no-cache',
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
async reportEntitlementRequested(featureId, customerId, entitlementCheckResult, requestedUsage) {
|
|
@@ -63,4 +63,4 @@ class EntitlementsApi {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
exports.default = EntitlementsApi;
|
|
66
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXRsZW1lbnRzQXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwaS9lbnRpdGxlbWVudHMvZW50aXRsZW1lbnRzQXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsOENBQTRGO0FBZTVGLHVEQUE4RjtBQUU5RixNQUFNL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QUNmO2FBQ0Y7U0FDRixDQUNGLENBQUM7SUFDSixDQUFDO0lBRUQsNEJBQTRCO1FBQzFCLE9BQU8sSUFBSSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQTRFO1lBQ3RHLEtBQUssRUFBRSxzQ0FBb0I7U0FDNUIsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVELHFCQUFxQjtRQUNuQixPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUE4RDtZQUN4RixLQUFLLEVBQUUsK0JBQWE7U0FDckIsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUNGO0FBRUQsa0JBQWUsZUFBZSxDQUFDIn0=
|
|
@@ -120,10 +120,20 @@ export declare enum ApiKeyType {
|
|
|
120
120
|
Client = "CLIENT",
|
|
121
121
|
Server = "SERVER"
|
|
122
122
|
}
|
|
123
|
+
export declare type ArchiveCouponInput = {
|
|
124
|
+
environmentId?: Maybe<Scalars['String']>;
|
|
125
|
+
refId: Scalars['String'];
|
|
126
|
+
};
|
|
123
127
|
export declare type ArchivePlanInput = {
|
|
124
128
|
environmentId: Scalars['String'];
|
|
125
129
|
id: Scalars['String'];
|
|
126
130
|
};
|
|
131
|
+
export declare type AttachCustomerPaymentMethodInput = {
|
|
132
|
+
environmentId?: Maybe<Scalars['String']>;
|
|
133
|
+
paymentMethodId: Scalars['String'];
|
|
134
|
+
refId: Scalars['String'];
|
|
135
|
+
vendorIdentifier: VendorIdentifier;
|
|
136
|
+
};
|
|
127
137
|
/** Billing model. */
|
|
128
138
|
export declare enum BillingModel {
|
|
129
139
|
FlatFee = "FLAT_FEE",
|
|
@@ -176,6 +186,104 @@ export declare enum ChangeType {
|
|
|
176
186
|
Deleted = "DELETED",
|
|
177
187
|
Modified = "MODIFIED"
|
|
178
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
|
+
};
|
|
179
287
|
export declare type CreateEnvironment = {
|
|
180
288
|
createdAt?: Maybe<Scalars['DateTime']>;
|
|
181
289
|
description?: Maybe<Scalars['String']>;
|
|
@@ -299,6 +407,7 @@ export declare type CustomerInput = {
|
|
|
299
407
|
additionalMetaData?: Maybe<Scalars['JSON']>;
|
|
300
408
|
billingId?: Maybe<Scalars['String']>;
|
|
301
409
|
billingInformation?: Maybe<CustomerBillingInfo>;
|
|
410
|
+
couponRefId?: Maybe<Scalars['String']>;
|
|
302
411
|
crmId?: Maybe<Scalars['String']>;
|
|
303
412
|
email?: Maybe<Scalars['String']>;
|
|
304
413
|
environmentId?: Maybe<Scalars['String']>;
|
|
@@ -498,6 +607,10 @@ export declare enum EntitlementResetPeriod {
|
|
|
498
607
|
Month = "MONTH",
|
|
499
608
|
Week = "WEEK"
|
|
500
609
|
}
|
|
610
|
+
export declare enum EntitySelectionMode {
|
|
611
|
+
BlackList = "BLACK_LIST",
|
|
612
|
+
WhiteList = "WHITE_LIST"
|
|
613
|
+
}
|
|
501
614
|
export declare type EnvironmentFilter = {
|
|
502
615
|
and?: Maybe<Array<EnvironmentFilter>>;
|
|
503
616
|
createdAt?: Maybe<DateFieldComparison>;
|
|
@@ -519,11 +632,15 @@ export declare enum EnvironmentSortFields {
|
|
|
519
632
|
}
|
|
520
633
|
/** error codes */
|
|
521
634
|
export declare enum ErrorCode {
|
|
635
|
+
AddonHasToHavePriceError = "AddonHasToHavePriceError",
|
|
522
636
|
AddonNotFound = "AddonNotFound",
|
|
637
|
+
ArchivedCouponCantBeApplied = "ArchivedCouponCantBeApplied",
|
|
523
638
|
BadUserInput = "BadUserInput",
|
|
524
639
|
BillingPeriodMissingError = "BillingPeriodMissingError",
|
|
525
640
|
CheckoutIsNotSupported = "CheckoutIsNotSupported",
|
|
641
|
+
CouponNotFound = "CouponNotFound",
|
|
526
642
|
CustomerHasNoPaymentMethod = "CustomerHasNoPaymentMethod",
|
|
643
|
+
CustomerNoBillingId = "CustomerNoBillingId",
|
|
527
644
|
CustomerNotFound = "CustomerNotFound",
|
|
528
645
|
DraftPlanCantBeArchived = "DraftPlanCantBeArchived",
|
|
529
646
|
DuplicatedEntityNotAllowed = "DuplicatedEntityNotAllowed",
|
|
@@ -532,6 +649,8 @@ export declare enum ErrorCode {
|
|
|
532
649
|
FailedToImportCustomer = "FailedToImportCustomer",
|
|
533
650
|
FeatureNotFound = "FeatureNotFound",
|
|
534
651
|
IdentityForbidden = "IdentityForbidden",
|
|
652
|
+
ImportAlreadyInProgress = "ImportAlreadyInProgress",
|
|
653
|
+
InitStripePaymentMethodError = "InitStripePaymentMethodError",
|
|
535
654
|
IntegrationNotFound = "IntegrationNotFound",
|
|
536
655
|
IntegrityViolation = "IntegrityViolation",
|
|
537
656
|
InvalidAddressError = "InvalidAddressError",
|
|
@@ -555,6 +674,8 @@ export declare enum ErrorCode {
|
|
|
555
674
|
PriceNotFound = "PriceNotFound",
|
|
556
675
|
RateLimitExceeded = "RateLimitExceeded",
|
|
557
676
|
ResyncAlreadyInProgress = "ResyncAlreadyInProgress",
|
|
677
|
+
SelectedBillingModelDoesntMatchImportedItemError = "SelectedBillingModelDoesntMatchImportedItemError",
|
|
678
|
+
StripeCustomerIsDeleted = "StripeCustomerIsDeleted",
|
|
558
679
|
SubscriptionAlreadyCanceledOrExpired = "SubscriptionAlreadyCanceledOrExpired",
|
|
559
680
|
SubscriptionMustHaveSinglePlanError = "SubscriptionMustHaveSinglePlanError",
|
|
560
681
|
SubscriptionNotFound = "SubscriptionNotFound",
|
|
@@ -573,6 +694,9 @@ export declare enum EventLogType {
|
|
|
573
694
|
AddonCreated = "ADDON_CREATED",
|
|
574
695
|
AddonDeleted = "ADDON_DELETED",
|
|
575
696
|
AddonUpdated = "ADDON_UPDATED",
|
|
697
|
+
CouponArchived = "COUPON_ARCHIVED",
|
|
698
|
+
CouponCreated = "COUPON_CREATED",
|
|
699
|
+
CouponUpdated = "COUPON_UPDATED",
|
|
576
700
|
CustomerCreated = "CUSTOMER_CREATED",
|
|
577
701
|
CustomerDeleted = "CUSTOMER_DELETED",
|
|
578
702
|
CustomerUpdated = "CUSTOMER_UPDATED",
|
|
@@ -583,6 +707,8 @@ export declare enum EventLogType {
|
|
|
583
707
|
FeatureCreated = "FEATURE_CREATED",
|
|
584
708
|
FeatureDeleted = "FEATURE_DELETED",
|
|
585
709
|
FeatureUpdated = "FEATURE_UPDATED",
|
|
710
|
+
ImportIntegrationCatalogTriggered = "IMPORT_INTEGRATION_CATALOG_TRIGGERED",
|
|
711
|
+
ImportIntegrationCustomersTriggered = "IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",
|
|
586
712
|
MeasurementReported = "MEASUREMENT_REPORTED",
|
|
587
713
|
PackagePublished = "PACKAGE_PUBLISHED",
|
|
588
714
|
PlanCreated = "PLAN_CREATED",
|
|
@@ -600,7 +726,8 @@ export declare enum EventLogType {
|
|
|
600
726
|
SubscriptionTrialEndsSoon = "SUBSCRIPTION_TRIAL_ENDS_SOON",
|
|
601
727
|
SubscriptionTrialExpired = "SUBSCRIPTION_TRIAL_EXPIRED",
|
|
602
728
|
SubscriptionTrialStarted = "SUBSCRIPTION_TRIAL_STARTED",
|
|
603
|
-
SubscriptionUpdated = "SUBSCRIPTION_UPDATED"
|
|
729
|
+
SubscriptionUpdated = "SUBSCRIPTION_UPDATED",
|
|
730
|
+
SubscriptionUsageUpdated = "SUBSCRIPTION_USAGE_UPDATED"
|
|
604
731
|
}
|
|
605
732
|
export declare type FeatureFilter = {
|
|
606
733
|
and?: Maybe<Array<FeatureFilter>>;
|
|
@@ -755,6 +882,51 @@ export declare type ImportCustomerInput = {
|
|
|
755
882
|
name?: Maybe<Scalars['String']>;
|
|
756
883
|
refId: Scalars['String'];
|
|
757
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
|
+
};
|
|
758
930
|
export declare type InitiateCheckoutInput = {
|
|
759
931
|
addons?: Maybe<Array<SubscriptionAddonInput>>;
|
|
760
932
|
billingPeriod: BillingPeriod;
|
|
@@ -1015,6 +1187,11 @@ export declare type PackageStatusFilterComparison = {
|
|
|
1015
1187
|
notIn?: Maybe<Array<PackageStatus>>;
|
|
1016
1188
|
notLike?: Maybe<PackageStatus>;
|
|
1017
1189
|
};
|
|
1190
|
+
/** Type of a payment method */
|
|
1191
|
+
export declare enum PaymentMethodType {
|
|
1192
|
+
Bank = "BANK",
|
|
1193
|
+
Card = "CARD"
|
|
1194
|
+
}
|
|
1018
1195
|
export declare type PlanCreateInput = {
|
|
1019
1196
|
additionalMetaData?: Maybe<Scalars['JSON']>;
|
|
1020
1197
|
billingId?: Maybe<Scalars['String']>;
|
|
@@ -1311,6 +1488,12 @@ export declare type RemoveCompatibleAddonsFromPlanInput = {
|
|
|
1311
1488
|
/** The ids of the relations. */
|
|
1312
1489
|
relationIds: Array<Scalars['String']>;
|
|
1313
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
|
+
};
|
|
1314
1497
|
export declare type ResyncIntegrationInput = {
|
|
1315
1498
|
environmentId: Scalars['String'];
|
|
1316
1499
|
vendorIdentifier: VendorIdentifier;
|
|
@@ -1327,6 +1510,12 @@ export declare type SetCompatibleAddonsOnPlanInput = {
|
|
|
1327
1510
|
/** The ids of the relations. */
|
|
1328
1511
|
relationIds: Array<Scalars['String']>;
|
|
1329
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
|
+
};
|
|
1330
1519
|
/** Sort Directions */
|
|
1331
1520
|
export declare enum SortDirection {
|
|
1332
1521
|
Asc = "ASC",
|
|
@@ -1358,6 +1547,20 @@ export declare type StripeCredentialsInput = {
|
|
|
1358
1547
|
authorizationCode: Scalars['String'];
|
|
1359
1548
|
isTestMode: Scalars['Boolean'];
|
|
1360
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
|
+
};
|
|
1361
1564
|
export declare type SubscriptionAddonFilter = {
|
|
1362
1565
|
addon?: Maybe<SubscriptionAddonFilterAddonFilter>;
|
|
1363
1566
|
and?: Maybe<Array<SubscriptionAddonFilter>>;
|
|
@@ -1593,11 +1796,18 @@ export declare type SubscriptionStatusFilterComparison = {
|
|
|
1593
1796
|
notIn?: Maybe<Array<SubscriptionStatus>>;
|
|
1594
1797
|
notLike?: Maybe<SubscriptionStatus>;
|
|
1595
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
|
+
}
|
|
1596
1806
|
export declare enum TaskStatus {
|
|
1597
1807
|
Completed = "COMPLETED",
|
|
1598
1808
|
Failed = "FAILED",
|
|
1599
1809
|
InProgress = "IN_PROGRESS",
|
|
1600
|
-
|
|
1810
|
+
PartiallyFailed = "PARTIALLY_FAILED",
|
|
1601
1811
|
Pending = "PENDING"
|
|
1602
1812
|
}
|
|
1603
1813
|
export declare type TaskStatusFilterComparison = {
|
|
@@ -1617,6 +1827,8 @@ export declare type TaskStatusFilterComparison = {
|
|
|
1617
1827
|
notLike?: Maybe<TaskStatus>;
|
|
1618
1828
|
};
|
|
1619
1829
|
export declare enum TaskType {
|
|
1830
|
+
ImportIntegrationCatalog = "IMPORT_INTEGRATION_CATALOG",
|
|
1831
|
+
ImportIntegrationCustomers = "IMPORT_INTEGRATION_CUSTOMERS",
|
|
1620
1832
|
ResyncIntegration = "RESYNC_INTEGRATION",
|
|
1621
1833
|
SubscriptionMigration = "SUBSCRIPTION_MIGRATION"
|
|
1622
1834
|
}
|
|
@@ -1649,10 +1861,23 @@ export declare enum TrialPeriodUnits {
|
|
|
1649
1861
|
Day = "DAY",
|
|
1650
1862
|
Month = "MONTH"
|
|
1651
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
|
+
};
|
|
1652
1876
|
export declare type UpdateCustomerInput = {
|
|
1653
1877
|
additionalMetaData?: Maybe<Scalars['JSON']>;
|
|
1654
1878
|
billingId?: Maybe<Scalars['String']>;
|
|
1655
1879
|
billingInformation?: Maybe<CustomerBillingInfo>;
|
|
1880
|
+
couponRefId?: Maybe<Scalars['String']>;
|
|
1656
1881
|
crmId?: Maybe<Scalars['String']>;
|
|
1657
1882
|
email?: Maybe<Scalars['String']>;
|
|
1658
1883
|
environmentId?: Maybe<Scalars['String']>;
|
|
@@ -1854,6 +2079,47 @@ export declare type GetEnvironmentQuery = {
|
|
|
1854
2079
|
__typename?: 'Query';
|
|
1855
2080
|
currentEnvironment: string;
|
|
1856
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
|
+
};
|
|
1857
2123
|
export declare type PriceFragment = {
|
|
1858
2124
|
__typename?: 'Price';
|
|
1859
2125
|
billingModel: BillingModel;
|
|
@@ -1870,6 +2136,19 @@ export declare type PriceFragment = {
|
|
|
1870
2136
|
displayName: string;
|
|
1871
2137
|
} | null | undefined;
|
|
1872
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
|
+
};
|
|
1873
2152
|
export declare type PackageEntitlementFragment = {
|
|
1874
2153
|
__typename?: 'PackageEntitlement';
|
|
1875
2154
|
usageLimit?: number | null | undefined;
|
|
@@ -1957,6 +2236,9 @@ export declare type SubscriptionFragment = {
|
|
|
1957
2236
|
__typename?: 'Price';
|
|
1958
2237
|
} & PriceFragment;
|
|
1959
2238
|
}> | null | undefined;
|
|
2239
|
+
totalPrice?: ({
|
|
2240
|
+
__typename?: 'CustomerSubscriptionTotalPrice';
|
|
2241
|
+
} & TotalPriceFragment) | null | undefined;
|
|
1960
2242
|
plan: {
|
|
1961
2243
|
__typename?: 'Plan';
|
|
1962
2244
|
} & PlanFragment;
|
|
@@ -2000,6 +2282,9 @@ export declare type CustomerFragment = {
|
|
|
2000
2282
|
refId: string;
|
|
2001
2283
|
billingId?: string | null | undefined;
|
|
2002
2284
|
additionalMetaData?: any | null | undefined;
|
|
2285
|
+
coupon?: ({
|
|
2286
|
+
__typename?: 'Coupon';
|
|
2287
|
+
} & CouponFragment) | null | undefined;
|
|
2003
2288
|
promotionalEntitlements: Array<{
|
|
2004
2289
|
__typename?: 'PromotionalEntitlement';
|
|
2005
2290
|
} & PromotionalEntitlementFragment>;
|