@managespace/sdk 0.1.27 → 0.1.29
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/extensibility/functions/project/billing.d.ts +9 -17
- package/dist/extensibility/functions/project/billing.d.ts.map +1 -1
- package/dist/extensibility/functions/project/billing.js +5 -5
- package/dist/generated/apis/default-api.d.ts +13 -1
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +40 -0
- package/dist/generated/models/create-product-custom.d.ts +7 -1
- package/dist/generated/models/create-product-custom.d.ts.map +1 -1
- package/dist/generated/models/create-product-custom.js +4 -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/product-custom.d.ts +7 -1
- package/dist/generated/models/product-custom.d.ts.map +1 -1
- package/dist/generated/models/product-custom.js +4 -0
- package/dist/generated/models/update-product.d.ts +112 -0
- package/dist/generated/models/update-product.d.ts.map +1 -0
- package/dist/generated/models/update-product.js +88 -0
- package/package.deploy.json +1 -1
- package/package.json +1 -1
- package/src/extensibility/functions/project/billing.ts +7 -17
- package/src/generated/.openapi-generator/FILES +1 -0
- package/src/generated/apis/default-api.ts +70 -0
- package/src/generated/models/create-product-custom.ts +10 -1
- package/src/generated/models/index.ts +1 -0
- package/src/generated/models/product-custom.ts +10 -1
- package/src/generated/models/update-product.ts +183 -0
- package/dist/generated/models/change-active-site.d.ts +0 -33
- package/dist/generated/models/change-active-site.d.ts.map +0 -1
- package/dist/generated/models/change-active-site.js +0 -51
- package/dist/generated/models/create-checklist.d.ts +0 -76
- package/dist/generated/models/create-checklist.d.ts.map +0 -1
- package/dist/generated/models/create-checklist.js +0 -72
- package/dist/generated/models/create-task-template.d.ts +0 -45
- package/dist/generated/models/create-task-template.d.ts.map +0 -1
- package/dist/generated/models/create-task-template.js +0 -57
- package/dist/generated/models/create-task.d.ts +0 -76
- package/dist/generated/models/create-task.d.ts.map +0 -1
- package/dist/generated/models/create-task.js +0 -72
- package/dist/generated/models/custom-update-task-template.d.ts +0 -51
- package/dist/generated/models/custom-update-task-template.d.ts.map +0 -1
- package/dist/generated/models/custom-update-task-template.js +0 -63
- package/dist/generated/models/document-signed.d.ts +0 -69
- package/dist/generated/models/document-signed.d.ts.map +0 -1
- package/dist/generated/models/document-signed.js +0 -65
- package/dist/generated/models/get-payments1200-response.d.ts +0 -41
- package/dist/generated/models/get-payments1200-response.d.ts.map +0 -1
- package/dist/generated/models/get-payments1200-response.js +0 -55
- package/dist/generated/models/get-task-templates200-response.d.ts +0 -41
- package/dist/generated/models/get-task-templates200-response.d.ts.map +0 -1
- package/dist/generated/models/get-task-templates200-response.js +0 -55
- package/dist/generated/models/get-tasks200-response.d.ts +0 -41
- package/dist/generated/models/get-tasks200-response.d.ts.map +0 -1
- package/dist/generated/models/get-tasks200-response.js +0 -55
- package/dist/generated/models/task-template.d.ts +0 -98
- package/dist/generated/models/task-template.d.ts.map +0 -1
- package/dist/generated/models/task-template.js +0 -86
- package/dist/generated/models/task.d.ts +0 -160
- package/dist/generated/models/task.d.ts.map +0 -1
- package/dist/generated/models/task.js +0 -122
- package/dist/generated/models/update-checklist-task-template.d.ts +0 -33
- package/dist/generated/models/update-checklist-task-template.d.ts.map +0 -1
- package/dist/generated/models/update-checklist-task-template.js +0 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-custom.d.ts","sourceRoot":"","sources":["../../../src/generated/models/product-custom.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAQ/E;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,yBAAyB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,
|
|
1
|
+
{"version":3,"file":"product-custom.d.ts","sourceRoot":"","sources":["../../../src/generated/models/product-custom.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAQ/E;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,yBAAyB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAS7E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,aAAa,CAsBjG;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE5D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAuBhH"}
|
|
@@ -21,6 +21,8 @@ const transaction_posting_entries_1 = require("./transaction-posting-entries");
|
|
|
21
21
|
function instanceOfProductCustom(value) {
|
|
22
22
|
if (!('name' in value) || value['name'] === undefined)
|
|
23
23
|
return false;
|
|
24
|
+
if (!('rentRelated' in value) || value['rentRelated'] === undefined)
|
|
25
|
+
return false;
|
|
24
26
|
if (!('price' in value) || value['price'] === undefined)
|
|
25
27
|
return false;
|
|
26
28
|
if (!('revenueRuleId' in value) || value['revenueRuleId'] === undefined)
|
|
@@ -48,6 +50,7 @@ function ProductCustomFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
50
|
'status': json['status'] == null ? undefined : json['status'],
|
|
49
51
|
'taxable': json['taxable'] == null ? undefined : json['taxable'],
|
|
50
52
|
'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
|
|
53
|
+
'rentRelated': json['rentRelated'],
|
|
51
54
|
'description': json['description'] == null ? undefined : json['description'],
|
|
52
55
|
'price': json['price'],
|
|
53
56
|
'revenueRuleId': json['revenueRuleId'],
|
|
@@ -74,6 +77,7 @@ function ProductCustomToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
74
77
|
'status': value['status'],
|
|
75
78
|
'taxable': value['taxable'],
|
|
76
79
|
'isDefault': value['isDefault'],
|
|
80
|
+
'rentRelated': value['rentRelated'],
|
|
77
81
|
'description': value['description'],
|
|
78
82
|
'price': value['price'],
|
|
79
83
|
'revenueRuleId': value['revenueRuleId'],
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ManageSpace API
|
|
3
|
+
* ManageSpace API Documentation
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { TransactionPostingEntries } from './transaction-posting-entries';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UpdateProduct
|
|
17
|
+
*/
|
|
18
|
+
export interface UpdateProduct {
|
|
19
|
+
/**
|
|
20
|
+
* The product name
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UpdateProduct
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Stock keeping unit
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UpdateProduct
|
|
29
|
+
*/
|
|
30
|
+
sku?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Product status
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UpdateProduct
|
|
35
|
+
*/
|
|
36
|
+
status?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Tax exempt
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof UpdateProduct
|
|
41
|
+
*/
|
|
42
|
+
taxable?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Indicates whether it is the default product or not
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
* @memberof UpdateProduct
|
|
47
|
+
*/
|
|
48
|
+
isDefault?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Indicates whether it is related to rent or not
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof UpdateProduct
|
|
53
|
+
*/
|
|
54
|
+
rentRelated: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Description of product
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof UpdateProduct
|
|
59
|
+
*/
|
|
60
|
+
description?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The price of the product in the lowest denomination of the currency
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof UpdateProduct
|
|
65
|
+
*/
|
|
66
|
+
price: number;
|
|
67
|
+
/**
|
|
68
|
+
* Revenue Rule ID.
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof UpdateProduct
|
|
71
|
+
*/
|
|
72
|
+
revenueRuleId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Date revenue will begin to be recognized.
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof UpdateProduct
|
|
77
|
+
*/
|
|
78
|
+
recognitionStartDate: string;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Array<TransactionPostingEntries>}
|
|
82
|
+
* @memberof UpdateProduct
|
|
83
|
+
*/
|
|
84
|
+
transactionPostingEntries: Array<TransactionPostingEntries>;
|
|
85
|
+
/**
|
|
86
|
+
* List of custom fields
|
|
87
|
+
* @type {object}
|
|
88
|
+
* @memberof UpdateProduct
|
|
89
|
+
*/
|
|
90
|
+
customFields?: object;
|
|
91
|
+
/**
|
|
92
|
+
* Code of Chart of Account
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof UpdateProduct
|
|
95
|
+
*/
|
|
96
|
+
incomeAccount?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Select which tax group to be used
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof UpdateProduct
|
|
101
|
+
*/
|
|
102
|
+
productTaxGroupName?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Check if a given object implements the UpdateProduct interface.
|
|
106
|
+
*/
|
|
107
|
+
export declare function instanceOfUpdateProduct(value: object): value is UpdateProduct;
|
|
108
|
+
export declare function UpdateProductFromJSON(json: any): UpdateProduct;
|
|
109
|
+
export declare function UpdateProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateProduct;
|
|
110
|
+
export declare function UpdateProductToJSON(json: any): UpdateProduct;
|
|
111
|
+
export declare function UpdateProductToJSONTyped(value?: UpdateProduct | null, ignoreDiscriminator?: boolean): any;
|
|
112
|
+
//# sourceMappingURL=update-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-product.d.ts","sourceRoot":"","sources":["../../../src/generated/models/update-product.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAQ/E;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,yBAAyB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAQ7E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE9D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,aAAa,CAqBjG;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa,CAE5D;AAED,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAsBhH"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* ManageSpace API
|
|
6
|
+
* ManageSpace API Documentation
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateProductToJSONTyped = exports.UpdateProductToJSON = exports.UpdateProductFromJSONTyped = exports.UpdateProductFromJSON = exports.instanceOfUpdateProduct = void 0;
|
|
17
|
+
const transaction_posting_entries_1 = require("./transaction-posting-entries");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the UpdateProduct interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfUpdateProduct(value) {
|
|
22
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('rentRelated' in value) || value['rentRelated'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('price' in value) || value['price'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('revenueRuleId' in value) || value['revenueRuleId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('recognitionStartDate' in value) || value['recognitionStartDate'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('transactionPostingEntries' in value) || value['transactionPostingEntries'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
exports.instanceOfUpdateProduct = instanceOfUpdateProduct;
|
|
37
|
+
function UpdateProductFromJSON(json) {
|
|
38
|
+
return UpdateProductFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
exports.UpdateProductFromJSON = UpdateProductFromJSON;
|
|
41
|
+
function UpdateProductFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'name': json['name'],
|
|
47
|
+
'sku': json['sku'] == null ? undefined : json['sku'],
|
|
48
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
49
|
+
'taxable': json['taxable'] == null ? undefined : json['taxable'],
|
|
50
|
+
'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
|
|
51
|
+
'rentRelated': json['rentRelated'],
|
|
52
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
53
|
+
'price': json['price'],
|
|
54
|
+
'revenueRuleId': json['revenueRuleId'],
|
|
55
|
+
'recognitionStartDate': json['recognitionStartDate'],
|
|
56
|
+
'transactionPostingEntries': (json['transactionPostingEntries'].map(transaction_posting_entries_1.TransactionPostingEntriesFromJSON)),
|
|
57
|
+
'customFields': json['customFields'] == null ? undefined : json['customFields'],
|
|
58
|
+
'incomeAccount': json['incomeAccount'] == null ? undefined : json['incomeAccount'],
|
|
59
|
+
'productTaxGroupName': json['productTaxGroupName'] == null ? undefined : json['productTaxGroupName'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
exports.UpdateProductFromJSONTyped = UpdateProductFromJSONTyped;
|
|
63
|
+
function UpdateProductToJSON(json) {
|
|
64
|
+
return UpdateProductToJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
exports.UpdateProductToJSON = UpdateProductToJSON;
|
|
67
|
+
function UpdateProductToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'name': value['name'],
|
|
73
|
+
'sku': value['sku'],
|
|
74
|
+
'status': value['status'],
|
|
75
|
+
'taxable': value['taxable'],
|
|
76
|
+
'isDefault': value['isDefault'],
|
|
77
|
+
'rentRelated': value['rentRelated'],
|
|
78
|
+
'description': value['description'],
|
|
79
|
+
'price': value['price'],
|
|
80
|
+
'revenueRuleId': value['revenueRuleId'],
|
|
81
|
+
'recognitionStartDate': value['recognitionStartDate'],
|
|
82
|
+
'transactionPostingEntries': (value['transactionPostingEntries'].map(transaction_posting_entries_1.TransactionPostingEntriesToJSON)),
|
|
83
|
+
'customFields': value['customFields'],
|
|
84
|
+
'incomeAccount': value['incomeAccount'],
|
|
85
|
+
'productTaxGroupName': value['productTaxGroupName'],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
exports.UpdateProductToJSONTyped = UpdateProductToJSONTyped;
|
package/package.deploy.json
CHANGED
package/package.json
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
ProductTaxGroup,
|
|
36
36
|
CreateProductTaxGroup as _CreateProductTaxGroup,
|
|
37
37
|
GetInvoicesQuery,
|
|
38
|
+
UpdateProduct as _UpdateProduct,
|
|
38
39
|
} from '../../../generated';
|
|
39
40
|
import { CustomCreateContact } from '../../../generated/models/custom-create-contact';
|
|
40
41
|
import { CustomUpdateCustomer } from '../../../generated/models/custom-update-customer';
|
|
@@ -99,23 +100,6 @@ export namespace Billing {
|
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
export class CreateLedger implements ExtPlugin {
|
|
103
|
-
responseType!: Pick<Customer, 'id' | 'externalId'> & {
|
|
104
|
-
contacts: Pick<Contact, 'id' | 'externalId'>[];
|
|
105
|
-
};
|
|
106
|
-
payload!: {
|
|
107
|
-
parentCustomerId: string;
|
|
108
|
-
externalId: string;
|
|
109
|
-
name: string;
|
|
110
|
-
description: string;
|
|
111
|
-
paymentTerms: string;
|
|
112
|
-
autoPay: string;
|
|
113
|
-
billingCycleDay: string;
|
|
114
|
-
currency: string;
|
|
115
|
-
balance: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
103
|
// export class CustomerCreated implements ExtPlugin {
|
|
120
104
|
// responseType!: any;
|
|
121
105
|
// payload!: any;
|
|
@@ -214,6 +198,7 @@ export namespace Billing {
|
|
|
214
198
|
active?: boolean;
|
|
215
199
|
name?: string;
|
|
216
200
|
isDefault?: boolean;
|
|
201
|
+
rentRelated?: boolean;
|
|
217
202
|
siteId: string;
|
|
218
203
|
};
|
|
219
204
|
}
|
|
@@ -388,4 +373,9 @@ export namespace Billing {
|
|
|
388
373
|
responseType!: ProductTaxGroup[];
|
|
389
374
|
payload!: BasePaginationQuery & { status?: string };
|
|
390
375
|
}
|
|
376
|
+
|
|
377
|
+
export class UpdateProduct implements ExtPlugin {
|
|
378
|
+
responseType!: ProductCustom;
|
|
379
|
+
payload!: _UpdateProduct & { siteId: string; productId: string };
|
|
380
|
+
}
|
|
391
381
|
}
|
|
@@ -159,6 +159,7 @@ import type {
|
|
|
159
159
|
UpdateNote,
|
|
160
160
|
UpdateOrg,
|
|
161
161
|
UpdatePlan,
|
|
162
|
+
UpdateProduct,
|
|
162
163
|
UpdateSmartBarPrompt,
|
|
163
164
|
UpdateSubscription,
|
|
164
165
|
UpdateTaskInstance,
|
|
@@ -463,6 +464,8 @@ import {
|
|
|
463
464
|
UpdateOrgToJSON,
|
|
464
465
|
UpdatePlanFromJSON,
|
|
465
466
|
UpdatePlanToJSON,
|
|
467
|
+
UpdateProductFromJSON,
|
|
468
|
+
UpdateProductToJSON,
|
|
466
469
|
UpdateSmartBarPromptFromJSON,
|
|
467
470
|
UpdateSmartBarPromptToJSON,
|
|
468
471
|
UpdateSubscriptionFromJSON,
|
|
@@ -989,6 +992,7 @@ export interface GetProductsRequest {
|
|
|
989
992
|
active?: string;
|
|
990
993
|
name?: string;
|
|
991
994
|
isDefault?: string;
|
|
995
|
+
rentRelated?: string;
|
|
992
996
|
}
|
|
993
997
|
|
|
994
998
|
export interface GetRentRollRequest {
|
|
@@ -1237,6 +1241,12 @@ export interface UpdatePlanRequest {
|
|
|
1237
1241
|
updatePlan: UpdatePlan;
|
|
1238
1242
|
}
|
|
1239
1243
|
|
|
1244
|
+
export interface UpdateProductRequest {
|
|
1245
|
+
siteId: string;
|
|
1246
|
+
productId: string;
|
|
1247
|
+
updateProduct: UpdateProduct;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1240
1250
|
export interface UpdateSiteRequest {
|
|
1241
1251
|
siteId: string;
|
|
1242
1252
|
createSiteCustom: CreateSiteCustom;
|
|
@@ -5748,6 +5758,10 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
5748
5758
|
queryParameters['isDefault'] = requestParameters['isDefault'];
|
|
5749
5759
|
}
|
|
5750
5760
|
|
|
5761
|
+
if (requestParameters['rentRelated'] != null) {
|
|
5762
|
+
queryParameters['rentRelated'] = requestParameters['rentRelated'];
|
|
5763
|
+
}
|
|
5764
|
+
|
|
5751
5765
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
5752
5766
|
|
|
5753
5767
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -8080,6 +8094,62 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
8080
8094
|
return await response.value();
|
|
8081
8095
|
}
|
|
8082
8096
|
|
|
8097
|
+
/**
|
|
8098
|
+
*/
|
|
8099
|
+
async updateProductRaw(requestParameters: UpdateProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductCustom>> {
|
|
8100
|
+
if (requestParameters['siteId'] == null) {
|
|
8101
|
+
throw new runtime.RequiredError(
|
|
8102
|
+
'siteId',
|
|
8103
|
+
'Required parameter "siteId" was null or undefined when calling updateProduct().'
|
|
8104
|
+
);
|
|
8105
|
+
}
|
|
8106
|
+
|
|
8107
|
+
if (requestParameters['productId'] == null) {
|
|
8108
|
+
throw new runtime.RequiredError(
|
|
8109
|
+
'productId',
|
|
8110
|
+
'Required parameter "productId" was null or undefined when calling updateProduct().'
|
|
8111
|
+
);
|
|
8112
|
+
}
|
|
8113
|
+
|
|
8114
|
+
if (requestParameters['updateProduct'] == null) {
|
|
8115
|
+
throw new runtime.RequiredError(
|
|
8116
|
+
'updateProduct',
|
|
8117
|
+
'Required parameter "updateProduct" was null or undefined when calling updateProduct().'
|
|
8118
|
+
);
|
|
8119
|
+
}
|
|
8120
|
+
|
|
8121
|
+
const queryParameters: any = {};
|
|
8122
|
+
|
|
8123
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
8124
|
+
|
|
8125
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
8126
|
+
|
|
8127
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
8128
|
+
const token = this.configuration.accessToken;
|
|
8129
|
+
const tokenString = await token("bearer", []);
|
|
8130
|
+
|
|
8131
|
+
if (tokenString) {
|
|
8132
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
8133
|
+
}
|
|
8134
|
+
}
|
|
8135
|
+
const response = await this.request({
|
|
8136
|
+
path: `/api/sites/{siteId}/billing/products/{productId}`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId']))),
|
|
8137
|
+
method: 'PUT',
|
|
8138
|
+
headers: headerParameters,
|
|
8139
|
+
query: queryParameters,
|
|
8140
|
+
body: UpdateProductToJSON(requestParameters['updateProduct']),
|
|
8141
|
+
}, initOverrides);
|
|
8142
|
+
|
|
8143
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProductCustomFromJSON(jsonValue));
|
|
8144
|
+
}
|
|
8145
|
+
|
|
8146
|
+
/**
|
|
8147
|
+
*/
|
|
8148
|
+
async updateProduct(requestParameters: UpdateProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductCustom> {
|
|
8149
|
+
const response = await this.updateProductRaw(requestParameters, initOverrides);
|
|
8150
|
+
return await response.value();
|
|
8151
|
+
}
|
|
8152
|
+
|
|
8083
8153
|
/**
|
|
8084
8154
|
*/
|
|
8085
8155
|
async updateSiteRaw(requestParameters: UpdateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Site>> {
|
|
@@ -52,11 +52,17 @@ export interface CreateProductCustom {
|
|
|
52
52
|
*/
|
|
53
53
|
taxable?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Indicates whether it is the default product or not
|
|
56
56
|
* @type {boolean}
|
|
57
57
|
* @memberof CreateProductCustom
|
|
58
58
|
*/
|
|
59
59
|
isDefault?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Indicates whether it is related to rent or not
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof CreateProductCustom
|
|
64
|
+
*/
|
|
65
|
+
rentRelated: boolean;
|
|
60
66
|
/**
|
|
61
67
|
* Description of product
|
|
62
68
|
* @type {string}
|
|
@@ -112,6 +118,7 @@ export interface CreateProductCustom {
|
|
|
112
118
|
*/
|
|
113
119
|
export function instanceOfCreateProductCustom(value: object): value is CreateProductCustom {
|
|
114
120
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
121
|
+
if (!('rentRelated' in value) || value['rentRelated'] === undefined) return false;
|
|
115
122
|
if (!('price' in value) || value['price'] === undefined) return false;
|
|
116
123
|
if (!('revenueRuleId' in value) || value['revenueRuleId'] === undefined) return false;
|
|
117
124
|
if (!('recognitionStartDate' in value) || value['recognitionStartDate'] === undefined) return false;
|
|
@@ -134,6 +141,7 @@ export function CreateProductCustomFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
134
141
|
'status': json['status'] == null ? undefined : json['status'],
|
|
135
142
|
'taxable': json['taxable'] == null ? undefined : json['taxable'],
|
|
136
143
|
'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
|
|
144
|
+
'rentRelated': json['rentRelated'],
|
|
137
145
|
'description': json['description'] == null ? undefined : json['description'],
|
|
138
146
|
'price': json['price'],
|
|
139
147
|
'revenueRuleId': json['revenueRuleId'],
|
|
@@ -161,6 +169,7 @@ export function CreateProductCustomToJSONTyped(value?: CreateProductCustom | nul
|
|
|
161
169
|
'status': value['status'],
|
|
162
170
|
'taxable': value['taxable'],
|
|
163
171
|
'isDefault': value['isDefault'],
|
|
172
|
+
'rentRelated': value['rentRelated'],
|
|
164
173
|
'description': value['description'],
|
|
165
174
|
'price': value['price'],
|
|
166
175
|
'revenueRuleId': value['revenueRuleId'],
|
|
@@ -211,6 +211,7 @@ export * from './update-map-feature';
|
|
|
211
211
|
export * from './update-note';
|
|
212
212
|
export * from './update-org';
|
|
213
213
|
export * from './update-plan';
|
|
214
|
+
export * from './update-product';
|
|
214
215
|
export * from './update-smart-bar-prompt';
|
|
215
216
|
export * from './update-subscription';
|
|
216
217
|
export * from './update-subscription-charge';
|
|
@@ -52,11 +52,17 @@ export interface ProductCustom {
|
|
|
52
52
|
*/
|
|
53
53
|
taxable?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Indicates whether it is the default product or not
|
|
56
56
|
* @type {boolean}
|
|
57
57
|
* @memberof ProductCustom
|
|
58
58
|
*/
|
|
59
59
|
isDefault?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Indicates whether it is related to rent or not
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof ProductCustom
|
|
64
|
+
*/
|
|
65
|
+
rentRelated: boolean;
|
|
60
66
|
/**
|
|
61
67
|
* Description of product
|
|
62
68
|
* @type {string}
|
|
@@ -118,6 +124,7 @@ export interface ProductCustom {
|
|
|
118
124
|
*/
|
|
119
125
|
export function instanceOfProductCustom(value: object): value is ProductCustom {
|
|
120
126
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
127
|
+
if (!('rentRelated' in value) || value['rentRelated'] === undefined) return false;
|
|
121
128
|
if (!('price' in value) || value['price'] === undefined) return false;
|
|
122
129
|
if (!('revenueRuleId' in value) || value['revenueRuleId'] === undefined) return false;
|
|
123
130
|
if (!('recognitionStartDate' in value) || value['recognitionStartDate'] === undefined) return false;
|
|
@@ -141,6 +148,7 @@ export function ProductCustomFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
141
148
|
'status': json['status'] == null ? undefined : json['status'],
|
|
142
149
|
'taxable': json['taxable'] == null ? undefined : json['taxable'],
|
|
143
150
|
'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
|
|
151
|
+
'rentRelated': json['rentRelated'],
|
|
144
152
|
'description': json['description'] == null ? undefined : json['description'],
|
|
145
153
|
'price': json['price'],
|
|
146
154
|
'revenueRuleId': json['revenueRuleId'],
|
|
@@ -169,6 +177,7 @@ export function ProductCustomToJSONTyped(value?: ProductCustom | null, ignoreDis
|
|
|
169
177
|
'status': value['status'],
|
|
170
178
|
'taxable': value['taxable'],
|
|
171
179
|
'isDefault': value['isDefault'],
|
|
180
|
+
'rentRelated': value['rentRelated'],
|
|
172
181
|
'description': value['description'],
|
|
173
182
|
'price': value['price'],
|
|
174
183
|
'revenueRuleId': value['revenueRuleId'],
|