@managespace/sdk 0.1.189-melissa.dev → 0.1.189
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/generated/apis/default-api.d.ts +10 -11
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +33 -32
- package/dist/generated/models/create-credit.d.ts +7 -0
- package/dist/generated/models/create-credit.d.ts.map +1 -1
- package/dist/generated/models/create-credit.js +3 -0
- package/dist/generated/models/create-product-custom.d.ts +6 -0
- package/dist/generated/models/create-product-custom.d.ts.map +1 -1
- package/dist/generated/models/create-product-custom.js +2 -0
- package/dist/generated/models/create-subscription-charge.d.ts +0 -6
- package/dist/generated/models/create-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/create-subscription-charge.js +0 -2
- package/dist/generated/models/credit-applies-to-product-type.d.ts +29 -0
- package/dist/generated/models/credit-applies-to-product-type.d.ts.map +1 -0
- package/dist/generated/models/credit-applies-to-product-type.js +55 -0
- package/dist/generated/models/credit.d.ts +7 -0
- package/dist/generated/models/credit.d.ts.map +1 -1
- package/dist/generated/models/credit.js +3 -0
- package/dist/generated/models/index.d.ts +1 -0
- package/dist/generated/models/index.d.ts.map +1 -1
- package/dist/generated/models/index.js +1 -0
- package/dist/generated/models/journal-entry-entries.d.ts +12 -0
- package/dist/generated/models/journal-entry-entries.d.ts.map +1 -1
- package/dist/generated/models/journal-entry-entries.js +8 -0
- package/dist/generated/models/journal-entry.d.ts +31 -0
- package/dist/generated/models/journal-entry.d.ts.map +1 -1
- package/dist/generated/models/journal-entry.js +25 -0
- package/dist/generated/models/product-custom.d.ts +6 -0
- package/dist/generated/models/product-custom.d.ts.map +1 -1
- package/dist/generated/models/product-custom.js +2 -0
- package/dist/generated/models/product-type.d.ts +3 -0
- package/dist/generated/models/product-type.d.ts.map +1 -1
- package/dist/generated/models/product-type.js +4 -1
- package/dist/generated/models/subscription-charge.d.ts +0 -12
- package/dist/generated/models/subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/subscription-charge.js +0 -6
- package/dist/generated/models/update-product.d.ts +6 -0
- package/dist/generated/models/update-product.d.ts.map +1 -1
- package/dist/generated/models/update-product.js +2 -0
- package/dist/generated/models/update-subscription-charge.d.ts +0 -6
- package/dist/generated/models/update-subscription-charge.d.ts.map +1 -1
- package/dist/generated/models/update-subscription-charge.js +0 -2
- package/package.deploy.json +2 -2
- package/package.json +3 -3
- package/src/generated/.openapi-generator/FILES +1 -0
- package/src/generated/apis/default-api.ts +47 -44
- package/src/generated/models/create-credit.ts +17 -0
- package/src/generated/models/create-product-custom.ts +8 -0
- package/src/generated/models/create-subscription-charge.ts +0 -8
- package/src/generated/models/credit-applies-to-product-type.ts +57 -0
- package/src/generated/models/credit.ts +17 -0
- package/src/generated/models/index.ts +1 -0
- package/src/generated/models/journal-entry-entries.ts +18 -0
- package/src/generated/models/journal-entry.ts +43 -0
- package/src/generated/models/product-custom.ts +8 -0
- package/src/generated/models/product-type.ts +4 -1
- package/src/generated/models/subscription-charge.ts +0 -17
- package/src/generated/models/update-product.ts +8 -0
- package/src/generated/models/update-subscription-charge.ts +0 -8
- package/package.workspace.json +0 -23
|
@@ -58,6 +58,24 @@ export interface JournalEntry {
|
|
|
58
58
|
* @memberof JournalEntry
|
|
59
59
|
*/
|
|
60
60
|
description: string;
|
|
61
|
+
/**
|
|
62
|
+
* The Ordway object that produced this journal entry. Used to join back to the source transaction when resolving sub-account labels in the accrual report.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof JournalEntry
|
|
65
|
+
*/
|
|
66
|
+
sourceType: JournalEntrySourceType;
|
|
67
|
+
/**
|
|
68
|
+
* Identifier of the object that produced this journal entry (e.g. INV-54921, CR-01287, PMT-13031, REF-00246).
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof JournalEntry
|
|
71
|
+
*/
|
|
72
|
+
sourceId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Total transaction amount for the journal entry in the transaction currency
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof JournalEntry
|
|
77
|
+
*/
|
|
78
|
+
transactionAmount: string;
|
|
61
79
|
/**
|
|
62
80
|
* Journal entries
|
|
63
81
|
* @type {Array<JournalEntryEntries>}
|
|
@@ -108,6 +126,22 @@ export interface JournalEntry {
|
|
|
108
126
|
transactionConversionRate: number;
|
|
109
127
|
}
|
|
110
128
|
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @export
|
|
132
|
+
*/
|
|
133
|
+
export const JournalEntrySourceType = {
|
|
134
|
+
Subscription: 'Subscription',
|
|
135
|
+
Order: 'Order',
|
|
136
|
+
Invoice: 'Invoice',
|
|
137
|
+
Payment: 'Payment',
|
|
138
|
+
Credit: 'Credit',
|
|
139
|
+
RevenueSchedule: 'RevenueSchedule',
|
|
140
|
+
Refund: 'Refund'
|
|
141
|
+
} as const;
|
|
142
|
+
export type JournalEntrySourceType = typeof JournalEntrySourceType[keyof typeof JournalEntrySourceType];
|
|
143
|
+
|
|
144
|
+
|
|
111
145
|
/**
|
|
112
146
|
* Check if a given object implements the JournalEntry interface.
|
|
113
147
|
*/
|
|
@@ -117,6 +151,9 @@ export function instanceOfJournalEntry(value: object): value is JournalEntry {
|
|
|
117
151
|
if (!('customerId' in value) || value['customerId'] === undefined) return false;
|
|
118
152
|
if (!('customerName' in value) || value['customerName'] === undefined) return false;
|
|
119
153
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
154
|
+
if (!('sourceType' in value) || value['sourceType'] === undefined) return false;
|
|
155
|
+
if (!('sourceId' in value) || value['sourceId'] === undefined) return false;
|
|
156
|
+
if (!('transactionAmount' in value) || value['transactionAmount'] === undefined) return false;
|
|
120
157
|
if (!('entries' in value) || value['entries'] === undefined) return false;
|
|
121
158
|
if (!('customFields' in value) || value['customFields'] === undefined) return false;
|
|
122
159
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
@@ -143,6 +180,9 @@ export function JournalEntryFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
143
180
|
'customerId': json['customerId'],
|
|
144
181
|
'customerName': json['customerName'],
|
|
145
182
|
'description': json['description'],
|
|
183
|
+
'sourceType': json['sourceType'],
|
|
184
|
+
'sourceId': json['sourceId'],
|
|
185
|
+
'transactionAmount': json['transactionAmount'],
|
|
146
186
|
'entries': ((json['entries'] as Array<any>).map(JournalEntryEntriesFromJSON)),
|
|
147
187
|
'customFields': json['customFields'],
|
|
148
188
|
'createdAt': json['createdAt'],
|
|
@@ -170,6 +210,9 @@ export function JournalEntryToJSONTyped(value?: JournalEntry | null, ignoreDiscr
|
|
|
170
210
|
'customerId': value['customerId'],
|
|
171
211
|
'customerName': value['customerName'],
|
|
172
212
|
'description': value['description'],
|
|
213
|
+
'sourceType': value['sourceType'],
|
|
214
|
+
'sourceId': value['sourceId'],
|
|
215
|
+
'transactionAmount': value['transactionAmount'],
|
|
173
216
|
'entries': ((value['entries'] as Array<any>).map(JournalEntryEntriesToJSON)),
|
|
174
217
|
'customFields': value['customFields'],
|
|
175
218
|
'createdAt': value['createdAt'],
|
|
@@ -119,6 +119,12 @@ export interface ProductCustom {
|
|
|
119
119
|
* @memberof ProductCustom
|
|
120
120
|
*/
|
|
121
121
|
oneTimeCharge: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Product ID to use when writing off this product's charge
|
|
124
|
+
* @type {string}
|
|
125
|
+
* @memberof ProductCustom
|
|
126
|
+
*/
|
|
127
|
+
writeOffProductId?: string;
|
|
122
128
|
/**
|
|
123
129
|
* Product ID
|
|
124
130
|
* @type {string}
|
|
@@ -175,6 +181,7 @@ export function ProductCustomFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
175
181
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
176
182
|
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
177
183
|
'oneTimeCharge': json['oneTimeCharge'],
|
|
184
|
+
'writeOffProductId': json['writeOffProductId'] == null ? undefined : json['writeOffProductId'],
|
|
178
185
|
'id': json['id'],
|
|
179
186
|
'msExternalId': json['msExternalId'],
|
|
180
187
|
};
|
|
@@ -205,6 +212,7 @@ export function ProductCustomToJSONTyped(value?: ProductCustom | null, ignoreDis
|
|
|
205
212
|
'incomeAccount': value['incomeAccount'],
|
|
206
213
|
'productTaxGroupName': value['productTaxGroupName'],
|
|
207
214
|
'oneTimeCharge': value['oneTimeCharge'],
|
|
215
|
+
'writeOffProductId': value['writeOffProductId'],
|
|
208
216
|
'id': value['id'],
|
|
209
217
|
'msExternalId': value['msExternalId'],
|
|
210
218
|
};
|
|
@@ -24,7 +24,10 @@ export const ProductType = {
|
|
|
24
24
|
RENT_TREATMENT: 'RENT_TREATMENT',
|
|
25
25
|
INSURANCE: 'INSURANCE',
|
|
26
26
|
FEE: 'FEE',
|
|
27
|
-
MERCHANDISE: 'MERCHANDISE'
|
|
27
|
+
MERCHANDISE: 'MERCHANDISE',
|
|
28
|
+
WRITE_OFF: 'WRITE_OFF',
|
|
29
|
+
CREDIT: 'CREDIT',
|
|
30
|
+
DISCOUNT: 'DISCOUNT'
|
|
28
31
|
} as const;
|
|
29
32
|
export type ProductType = typeof ProductType[keyof typeof ProductType];
|
|
30
33
|
|
|
@@ -101,12 +101,6 @@ export interface SubscriptionCharge {
|
|
|
101
101
|
* @memberof SubscriptionCharge
|
|
102
102
|
*/
|
|
103
103
|
includedUnits?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Discount applied to product
|
|
106
|
-
* @type {number}
|
|
107
|
-
* @memberof SubscriptionCharge
|
|
108
|
-
*/
|
|
109
|
-
discount?: number;
|
|
110
104
|
/**
|
|
111
105
|
* Effective price of product
|
|
112
106
|
* @type {string}
|
|
@@ -305,12 +299,6 @@ export interface SubscriptionCharge {
|
|
|
305
299
|
* @memberof SubscriptionCharge
|
|
306
300
|
*/
|
|
307
301
|
assetId: string;
|
|
308
|
-
/**
|
|
309
|
-
* MRR calculated based on % discount
|
|
310
|
-
* @type {string}
|
|
311
|
-
* @memberof SubscriptionCharge
|
|
312
|
-
*/
|
|
313
|
-
discountedCmrr: string;
|
|
314
302
|
}
|
|
315
303
|
|
|
316
304
|
/**
|
|
@@ -319,7 +307,6 @@ export interface SubscriptionCharge {
|
|
|
319
307
|
export function instanceOfSubscriptionCharge(value: object): value is SubscriptionCharge {
|
|
320
308
|
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
321
309
|
if (!('assetId' in value) || value['assetId'] === undefined) return false;
|
|
322
|
-
if (!('discountedCmrr' in value) || value['discountedCmrr'] === undefined) return false;
|
|
323
310
|
return true;
|
|
324
311
|
}
|
|
325
312
|
|
|
@@ -344,7 +331,6 @@ export function SubscriptionChargeFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
344
331
|
'priceBase': json['priceBase'] == null ? undefined : json['priceBase'],
|
|
345
332
|
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
346
333
|
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
347
|
-
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
348
334
|
'effectivePrice': json['effectivePrice'] == null ? undefined : json['effectivePrice'],
|
|
349
335
|
'chargeType': json['chargeType'] == null ? undefined : json['chargeType'],
|
|
350
336
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -378,7 +364,6 @@ export function SubscriptionChargeFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
378
364
|
'customRecognitionEndDate': json['customRecognitionEndDate'] == null ? undefined : json['customRecognitionEndDate'],
|
|
379
365
|
'transactionPostingEntries': json['transactionPostingEntries'] == null ? undefined : ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
|
|
380
366
|
'assetId': json['assetId'],
|
|
381
|
-
'discountedCmrr': json['discountedCmrr'],
|
|
382
367
|
};
|
|
383
368
|
}
|
|
384
369
|
|
|
@@ -404,7 +389,6 @@ export function SubscriptionChargeToJSONTyped(value?: SubscriptionCharge | null,
|
|
|
404
389
|
'priceBase': value['priceBase'],
|
|
405
390
|
'quantity': value['quantity'],
|
|
406
391
|
'includedUnits': value['includedUnits'],
|
|
407
|
-
'discount': value['discount'],
|
|
408
392
|
'effectivePrice': value['effectivePrice'],
|
|
409
393
|
'chargeType': value['chargeType'],
|
|
410
394
|
'billingPeriod': value['billingPeriod'],
|
|
@@ -438,7 +422,6 @@ export function SubscriptionChargeToJSONTyped(value?: SubscriptionCharge | null,
|
|
|
438
422
|
'customRecognitionEndDate': value['customRecognitionEndDate'],
|
|
439
423
|
'transactionPostingEntries': value['transactionPostingEntries'] == null ? undefined : ((value['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesToJSON)),
|
|
440
424
|
'assetId': value['assetId'],
|
|
441
|
-
'discountedCmrr': value['discountedCmrr'],
|
|
442
425
|
};
|
|
443
426
|
}
|
|
444
427
|
|
|
@@ -119,6 +119,12 @@ export interface UpdateProduct {
|
|
|
119
119
|
* @memberof UpdateProduct
|
|
120
120
|
*/
|
|
121
121
|
oneTimeCharge: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Product ID to use when writing off this product's charge
|
|
124
|
+
* @type {string}
|
|
125
|
+
* @memberof UpdateProduct
|
|
126
|
+
*/
|
|
127
|
+
writeOffProductId?: string;
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
|
|
@@ -161,6 +167,7 @@ export function UpdateProductFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
161
167
|
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
162
168
|
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
163
169
|
'oneTimeCharge': json['oneTimeCharge'],
|
|
170
|
+
'writeOffProductId': json['writeOffProductId'] == null ? undefined : json['writeOffProductId'],
|
|
164
171
|
};
|
|
165
172
|
}
|
|
166
173
|
|
|
@@ -189,6 +196,7 @@ export function UpdateProductToJSONTyped(value?: UpdateProduct | null, ignoreDis
|
|
|
189
196
|
'incomeAccount': value['incomeAccount'],
|
|
190
197
|
'productTaxGroupName': value['productTaxGroupName'],
|
|
191
198
|
'oneTimeCharge': value['oneTimeCharge'],
|
|
199
|
+
'writeOffProductId': value['writeOffProductId'],
|
|
192
200
|
};
|
|
193
201
|
}
|
|
194
202
|
|
|
@@ -101,12 +101,6 @@ export interface UpdateSubscriptionCharge {
|
|
|
101
101
|
* @memberof UpdateSubscriptionCharge
|
|
102
102
|
*/
|
|
103
103
|
includedUnits?: number;
|
|
104
|
-
/**
|
|
105
|
-
* Discount applied to product
|
|
106
|
-
* @type {number}
|
|
107
|
-
* @memberof UpdateSubscriptionCharge
|
|
108
|
-
*/
|
|
109
|
-
discount?: number;
|
|
110
104
|
/**
|
|
111
105
|
* Effective price of product
|
|
112
106
|
* @type {string}
|
|
@@ -336,7 +330,6 @@ export function UpdateSubscriptionChargeFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
336
330
|
'priceBase': json['priceBase'] == null ? undefined : json['priceBase'],
|
|
337
331
|
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
338
332
|
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
339
|
-
'discount': json['discount'] == null ? undefined : json['discount'],
|
|
340
333
|
'effectivePrice': json['effectivePrice'] == null ? undefined : json['effectivePrice'],
|
|
341
334
|
'chargeType': json['chargeType'] == null ? undefined : json['chargeType'],
|
|
342
335
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -395,7 +388,6 @@ export function UpdateSubscriptionChargeToJSONTyped(value?: UpdateSubscriptionCh
|
|
|
395
388
|
'priceBase': value['priceBase'],
|
|
396
389
|
'quantity': value['quantity'],
|
|
397
390
|
'includedUnits': value['includedUnits'],
|
|
398
|
-
'discount': value['discount'],
|
|
399
391
|
'effectivePrice': value['effectivePrice'],
|
|
400
392
|
'chargeType': value['chargeType'],
|
|
401
393
|
'billingPeriod': value['billingPeriod'],
|
package/package.workspace.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@managespace/sdk",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"lint:check": "eslint .",
|
|
6
|
-
"lint:fix": "eslint --fix .",
|
|
7
|
-
"upload": "tsc && npm publish",
|
|
8
|
-
"typecheck": "tsc --noEmit",
|
|
9
|
-
"circular": "bunx madge --circular --warning --ts-config tsconfig.json --extensions ts ."
|
|
10
|
-
},
|
|
11
|
-
"exports": {
|
|
12
|
-
".": "./src/index.ts"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"import-sync": "^2.2.2",
|
|
16
|
-
"tslib": "catalog:",
|
|
17
|
-
"zod": "catalog:"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/node": "catalog:",
|
|
21
|
-
"@repo/typescript-config": "workspace:*"
|
|
22
|
-
}
|
|
23
|
-
}
|