@managespace/sdk 0.1.186 → 0.1.188
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 +3 -1
- package/dist/extensibility/functions/project/billing.d.ts.map +1 -1
- package/dist/generated/apis/default-api.d.ts +37 -1
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +132 -0
- package/dist/generated/models/billing-run.d.ts +6 -0
- package/dist/generated/models/billing-run.d.ts.map +1 -1
- package/dist/generated/models/billing-run.js +2 -0
- package/dist/generated/models/create-billing-run.d.ts +6 -0
- package/dist/generated/models/create-billing-run.d.ts.map +1 -1
- package/dist/generated/models/create-billing-run.js +2 -0
- package/dist/generated/models/create-order.d.ts +6 -0
- package/dist/generated/models/create-order.d.ts.map +1 -1
- package/dist/generated/models/create-order.js +2 -0
- package/dist/generated/models/custom-update-customer.d.ts +0 -6
- package/dist/generated/models/custom-update-customer.d.ts.map +1 -1
- package/dist/generated/models/custom-update-customer.js +0 -2
- package/dist/generated/models/document-status-value.d.ts +39 -0
- package/dist/generated/models/document-status-value.d.ts.map +1 -0
- package/dist/generated/models/document-status-value.js +55 -0
- package/dist/generated/models/document-status.d.ts +3 -5
- package/dist/generated/models/document-status.d.ts.map +1 -1
- package/dist/generated/models/document-status.js +3 -2
- package/dist/generated/models/financial-deposits-report-filters.d.ts +45 -0
- package/dist/generated/models/financial-deposits-report-filters.d.ts.map +1 -0
- package/dist/generated/models/financial-deposits-report-filters.js +57 -0
- package/dist/generated/models/financial-summary-report-filters.d.ts +45 -0
- package/dist/generated/models/financial-summary-report-filters.d.ts.map +1 -0
- package/dist/generated/models/financial-summary-report-filters.js +57 -0
- package/dist/generated/models/index.d.ts +3 -0
- package/dist/generated/models/index.d.ts.map +1 -1
- package/dist/generated/models/index.js +3 -0
- package/dist/generated/models/order.d.ts +6 -0
- package/dist/generated/models/order.d.ts.map +1 -1
- package/dist/generated/models/order.js +2 -0
- package/dist/generated/models/update-order.d.ts +6 -0
- package/dist/generated/models/update-order.d.ts.map +1 -1
- package/dist/generated/models/update-order.js +2 -0
- package/package.deploy.json +4 -8
- package/package.json +3 -4
- package/src/extensibility/functions/project/billing.ts +3 -1
- package/src/generated/.openapi-generator/FILES +3 -0
- package/src/generated/apis/default-api.ts +196 -0
- package/src/generated/models/billing-run.ts +8 -0
- package/src/generated/models/create-billing-run.ts +8 -0
- package/src/generated/models/create-order.ts +8 -0
- package/src/generated/models/custom-update-customer.ts +0 -8
- package/src/generated/models/document-status-value.ts +76 -0
- package/src/generated/models/document-status.ts +11 -4
- package/src/generated/models/financial-deposits-report-filters.ts +84 -0
- package/src/generated/models/financial-summary-report-filters.ts +84 -0
- package/src/generated/models/index.ts +3 -0
- package/src/generated/models/order.ts +8 -0
- package/src/generated/models/update-order.ts +8 -0
- package/dist/extensions/host-bridge.d.ts +0 -166
- package/dist/extensions/host-bridge.d.ts.map +0 -1
- package/dist/extensions/host-bridge.js +0 -259
- package/dist/extensions/index.d.ts +0 -40
- package/dist/extensions/index.d.ts.map +0 -1
- package/dist/extensions/index.js +0 -55
- package/dist/extensions/types.d.ts +0 -111
- package/dist/extensions/types.d.ts.map +0 -1
- package/dist/extensions/types.js +0 -2
- package/dist/generated/apis/extensions-api.d.ts +0 -98
- package/dist/generated/apis/extensions-api.d.ts.map +0 -1
- package/dist/generated/apis/extensions-api.js +0 -295
- package/dist/generated/models/extension-org.d.ts +0 -64
- package/dist/generated/models/extension-org.d.ts.map +0 -1
- package/dist/generated/models/extension-org.js +0 -70
- package/dist/generated/models/extension.d.ts +0 -106
- package/dist/generated/models/extension.d.ts.map +0 -1
- package/dist/generated/models/extension.js +0 -98
- package/dist/generated/models/update-document-type.d.ts +0 -43
- package/dist/generated/models/update-document-type.d.ts.map +0 -1
- package/dist/generated/models/update-document-type.js +0 -61
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
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
|
+
|
|
16
|
+
import { mapValues } from '../runtime';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface DocumentStatusValue
|
|
21
|
+
*/
|
|
22
|
+
export interface DocumentStatusValue {
|
|
23
|
+
/**
|
|
24
|
+
* Name of the form field.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof DocumentStatusValue
|
|
27
|
+
*/
|
|
28
|
+
field: string;
|
|
29
|
+
/**
|
|
30
|
+
* Value entered by the signer.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof DocumentStatusValue
|
|
33
|
+
*/
|
|
34
|
+
value: string | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the DocumentStatusValue interface.
|
|
39
|
+
*/
|
|
40
|
+
export function instanceOfDocumentStatusValue(value: object): value is DocumentStatusValue {
|
|
41
|
+
if (!('field' in value) || value['field'] === undefined) return false;
|
|
42
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function DocumentStatusValueFromJSON(json: any): DocumentStatusValue {
|
|
47
|
+
return DocumentStatusValueFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function DocumentStatusValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentStatusValue {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'field': json['field'],
|
|
57
|
+
'value': json['value'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function DocumentStatusValueToJSON(json: any): DocumentStatusValue {
|
|
62
|
+
return DocumentStatusValueToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function DocumentStatusValueToJSONTyped(value?: DocumentStatusValue | null, ignoreDiscriminator: boolean = false): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'field': value['field'],
|
|
73
|
+
'value': value['value'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -21,6 +21,13 @@ import {
|
|
|
21
21
|
DocumentStatusSignerToJSON,
|
|
22
22
|
DocumentStatusSignerToJSONTyped,
|
|
23
23
|
} from './document-status-signer';
|
|
24
|
+
import type { DocumentStatusValue } from './document-status-value';
|
|
25
|
+
import {
|
|
26
|
+
DocumentStatusValueFromJSON,
|
|
27
|
+
DocumentStatusValueFromJSONTyped,
|
|
28
|
+
DocumentStatusValueToJSON,
|
|
29
|
+
DocumentStatusValueToJSONTyped,
|
|
30
|
+
} from './document-status-value';
|
|
24
31
|
|
|
25
32
|
/**
|
|
26
33
|
*
|
|
@@ -54,10 +61,10 @@ export interface DocumentStatus {
|
|
|
54
61
|
signers: Array<DocumentStatusSigner>;
|
|
55
62
|
/**
|
|
56
63
|
* Field values filled in by the signer during document signing.
|
|
57
|
-
* @type {Array<
|
|
64
|
+
* @type {Array<DocumentStatusValue>}
|
|
58
65
|
* @memberof DocumentStatus
|
|
59
66
|
*/
|
|
60
|
-
values?: Array<
|
|
67
|
+
values?: Array<DocumentStatusValue>;
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
/**
|
|
@@ -85,7 +92,7 @@ export function DocumentStatusFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
85
92
|
'status': json['status'],
|
|
86
93
|
'allSignaturesGathered': json['allSignaturesGathered'],
|
|
87
94
|
'signers': ((json['signers'] as Array<any>).map(DocumentStatusSignerFromJSON)),
|
|
88
|
-
'values': json['values'] == null ? undefined : json['values'],
|
|
95
|
+
'values': json['values'] == null ? undefined : ((json['values'] as Array<any>).map(DocumentStatusValueFromJSON)),
|
|
89
96
|
};
|
|
90
97
|
}
|
|
91
98
|
|
|
@@ -104,7 +111,7 @@ export function DocumentStatusToJSONTyped(value?: DocumentStatus | null, ignoreD
|
|
|
104
111
|
'status': value['status'],
|
|
105
112
|
'allSignaturesGathered': value['allSignaturesGathered'],
|
|
106
113
|
'signers': ((value['signers'] as Array<any>).map(DocumentStatusSignerToJSON)),
|
|
107
|
-
'values': value['values'],
|
|
114
|
+
'values': value['values'] == null ? undefined : ((value['values'] as Array<any>).map(DocumentStatusValueToJSON)),
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
117
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
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
|
+
|
|
16
|
+
import { mapValues } from '../runtime';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface FinancialDepositsReportFilters
|
|
21
|
+
*/
|
|
22
|
+
export interface FinancialDepositsReportFilters {
|
|
23
|
+
/**
|
|
24
|
+
* Site ID to filter the report
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof FinancialDepositsReportFilters
|
|
27
|
+
*/
|
|
28
|
+
siteId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Start date for the report period
|
|
31
|
+
* @type {Date}
|
|
32
|
+
* @memberof FinancialDepositsReportFilters
|
|
33
|
+
*/
|
|
34
|
+
startDate: Date;
|
|
35
|
+
/**
|
|
36
|
+
* End date for the report period
|
|
37
|
+
* @type {Date}
|
|
38
|
+
* @memberof FinancialDepositsReportFilters
|
|
39
|
+
*/
|
|
40
|
+
endDate: Date;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the FinancialDepositsReportFilters interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfFinancialDepositsReportFilters(value: object): value is FinancialDepositsReportFilters {
|
|
47
|
+
if (!('startDate' in value) || value['startDate'] === undefined) return false;
|
|
48
|
+
if (!('endDate' in value) || value['endDate'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function FinancialDepositsReportFiltersFromJSON(json: any): FinancialDepositsReportFilters {
|
|
53
|
+
return FinancialDepositsReportFiltersFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function FinancialDepositsReportFiltersFromJSONTyped(json: any, ignoreDiscriminator: boolean): FinancialDepositsReportFilters {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'siteId': json['siteId'] == null ? undefined : json['siteId'],
|
|
63
|
+
'startDate': (new Date(json['startDate'])),
|
|
64
|
+
'endDate': (new Date(json['endDate'])),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function FinancialDepositsReportFiltersToJSON(json: any): FinancialDepositsReportFilters {
|
|
69
|
+
return FinancialDepositsReportFiltersToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function FinancialDepositsReportFiltersToJSONTyped(value?: FinancialDepositsReportFilters | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'siteId': value['siteId'],
|
|
80
|
+
'startDate': ((value['startDate']).toISOString().substring(0,10)),
|
|
81
|
+
'endDate': ((value['endDate']).toISOString().substring(0,10)),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
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
|
+
|
|
16
|
+
import { mapValues } from '../runtime';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface FinancialSummaryReportFilters
|
|
21
|
+
*/
|
|
22
|
+
export interface FinancialSummaryReportFilters {
|
|
23
|
+
/**
|
|
24
|
+
* Site ID to filter the report
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof FinancialSummaryReportFilters
|
|
27
|
+
*/
|
|
28
|
+
siteId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Start date for the report period
|
|
31
|
+
* @type {Date}
|
|
32
|
+
* @memberof FinancialSummaryReportFilters
|
|
33
|
+
*/
|
|
34
|
+
startDate: Date;
|
|
35
|
+
/**
|
|
36
|
+
* End date for the report period
|
|
37
|
+
* @type {Date}
|
|
38
|
+
* @memberof FinancialSummaryReportFilters
|
|
39
|
+
*/
|
|
40
|
+
endDate: Date;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the FinancialSummaryReportFilters interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfFinancialSummaryReportFilters(value: object): value is FinancialSummaryReportFilters {
|
|
47
|
+
if (!('startDate' in value) || value['startDate'] === undefined) return false;
|
|
48
|
+
if (!('endDate' in value) || value['endDate'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function FinancialSummaryReportFiltersFromJSON(json: any): FinancialSummaryReportFilters {
|
|
53
|
+
return FinancialSummaryReportFiltersFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function FinancialSummaryReportFiltersFromJSONTyped(json: any, ignoreDiscriminator: boolean): FinancialSummaryReportFilters {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'siteId': json['siteId'] == null ? undefined : json['siteId'],
|
|
63
|
+
'startDate': (new Date(json['startDate'])),
|
|
64
|
+
'endDate': (new Date(json['endDate'])),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function FinancialSummaryReportFiltersToJSON(json: any): FinancialSummaryReportFilters {
|
|
69
|
+
return FinancialSummaryReportFiltersToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function FinancialSummaryReportFiltersToJSONTyped(value?: FinancialSummaryReportFilters | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'siteId': value['siteId'],
|
|
80
|
+
'startDate': ((value['startDate']).toISOString().substring(0,10)),
|
|
81
|
+
'endDate': ((value['endDate']).toISOString().substring(0,10)),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -104,6 +104,7 @@ export * from './document-hierarchy';
|
|
|
104
104
|
export * from './document-signer';
|
|
105
105
|
export * from './document-status';
|
|
106
106
|
export * from './document-status-signer';
|
|
107
|
+
export * from './document-status-value';
|
|
107
108
|
export * from './document-url';
|
|
108
109
|
export * from './embed-config';
|
|
109
110
|
export * from './execute-by';
|
|
@@ -118,6 +119,8 @@ export * from './field-type';
|
|
|
118
119
|
export * from './filter-item';
|
|
119
120
|
export * from './filter-item-value';
|
|
120
121
|
export * from './filter-operator';
|
|
122
|
+
export * from './financial-deposits-report-filters';
|
|
123
|
+
export * from './financial-summary-report-filters';
|
|
121
124
|
export * from './get-asset-categories200-response';
|
|
122
125
|
export * from './get-asset-classes200-response';
|
|
123
126
|
export * from './get-asset-features200-response';
|
|
@@ -155,6 +155,12 @@ export interface Order {
|
|
|
155
155
|
* @memberof Order
|
|
156
156
|
*/
|
|
157
157
|
orderType: OrderType;
|
|
158
|
+
/**
|
|
159
|
+
* Idempotency key to prevent duplicate orders on retry
|
|
160
|
+
* @type {string}
|
|
161
|
+
* @memberof Order
|
|
162
|
+
*/
|
|
163
|
+
idempotencyKey?: string;
|
|
158
164
|
/**
|
|
159
165
|
* Order ID
|
|
160
166
|
* @type {string}
|
|
@@ -230,6 +236,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
230
236
|
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
231
237
|
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
232
238
|
'orderType': OrderTypeFromJSON(json['orderType']),
|
|
239
|
+
'idempotencyKey': json['idempotencyKey'] == null ? undefined : json['idempotencyKey'],
|
|
233
240
|
'id': json['id'],
|
|
234
241
|
'customerName': json['customerName'],
|
|
235
242
|
'separateInvoice': json['separateInvoice'],
|
|
@@ -268,6 +275,7 @@ export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: bool
|
|
|
268
275
|
'assetId': value['assetId'],
|
|
269
276
|
'subscriptionId': value['subscriptionId'],
|
|
270
277
|
'orderType': OrderTypeToJSON(value['orderType']),
|
|
278
|
+
'idempotencyKey': value['idempotencyKey'],
|
|
271
279
|
'id': value['id'],
|
|
272
280
|
'customerName': value['customerName'],
|
|
273
281
|
'separateInvoice': value['separateInvoice'],
|
|
@@ -155,6 +155,12 @@ export interface UpdateOrder {
|
|
|
155
155
|
* @memberof UpdateOrder
|
|
156
156
|
*/
|
|
157
157
|
orderType: OrderType;
|
|
158
|
+
/**
|
|
159
|
+
* Idempotency key to prevent duplicate orders on retry
|
|
160
|
+
* @type {string}
|
|
161
|
+
* @memberof UpdateOrder
|
|
162
|
+
*/
|
|
163
|
+
idempotencyKey?: string;
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
|
|
@@ -203,6 +209,7 @@ export function UpdateOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
203
209
|
'assetId': json['assetId'] == null ? undefined : json['assetId'],
|
|
204
210
|
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
205
211
|
'orderType': OrderTypeFromJSON(json['orderType']),
|
|
212
|
+
'idempotencyKey': json['idempotencyKey'] == null ? undefined : json['idempotencyKey'],
|
|
206
213
|
};
|
|
207
214
|
}
|
|
208
215
|
|
|
@@ -237,6 +244,7 @@ export function UpdateOrderToJSONTyped(value?: UpdateOrder | null, ignoreDiscrim
|
|
|
237
244
|
'assetId': value['assetId'],
|
|
238
245
|
'subscriptionId': value['subscriptionId'],
|
|
239
246
|
'orderType': OrderTypeToJSON(value['orderType']),
|
|
247
|
+
'idempotencyKey': value['idempotencyKey'],
|
|
240
248
|
};
|
|
241
249
|
}
|
|
242
250
|
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import type { EntityEventHandler, ExtensionContext } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Get the extension context from the ManageSpace host.
|
|
4
|
-
*
|
|
5
|
-
* This returns a promise that resolves when the context is received from the host.
|
|
6
|
-
* Call this early in your extension's lifecycle to get authentication and org context.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import { getContext } from '@managespace/sdk/extensions';
|
|
11
|
-
*
|
|
12
|
-
* const context = await getContext();
|
|
13
|
-
* console.log('Org ID:', context.orgId);
|
|
14
|
-
* console.log('API URL:', context.apiBaseUrl);
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function getContext(): Promise<ExtensionContext>;
|
|
18
|
-
/**
|
|
19
|
-
* Get the current context synchronously.
|
|
20
|
-
*
|
|
21
|
-
* Returns null if the context has not yet been received from the host.
|
|
22
|
-
* Prefer using `getContext()` which waits for the context to be available.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* import { getCurrentContext } from '@managespace/sdk/extensions';
|
|
27
|
-
*
|
|
28
|
-
* const context = getCurrentContext();
|
|
29
|
-
* if (context) {
|
|
30
|
-
* console.log('Already have context:', context.orgId);
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function getCurrentContext(): ExtensionContext | null;
|
|
35
|
-
/**
|
|
36
|
-
* Navigate the ManageSpace host application to a specific path.
|
|
37
|
-
*
|
|
38
|
-
* Use this to navigate users to pages within ManageSpace, such as
|
|
39
|
-
* customer profiles, asset details, or other views.
|
|
40
|
-
*
|
|
41
|
-
* @param path - The path to navigate to (e.g., "/customer/123")
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```typescript
|
|
45
|
-
* import { navigate } from '@managespace/sdk/extensions';
|
|
46
|
-
*
|
|
47
|
-
* // Navigate to a customer profile
|
|
48
|
-
* navigate('/customer/abc-123');
|
|
49
|
-
*
|
|
50
|
-
* // Navigate to the assets page
|
|
51
|
-
* navigate('/assets');
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export declare function navigate(path: string): void;
|
|
55
|
-
/**
|
|
56
|
-
* Show a toast notification in the ManageSpace host application.
|
|
57
|
-
*
|
|
58
|
-
* Use this for user feedback after actions complete.
|
|
59
|
-
*
|
|
60
|
-
* @param message - The message to display
|
|
61
|
-
* @param variant - The toast type: 'success' or 'error' (default: 'success')
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* import { showToast } from '@managespace/sdk/extensions';
|
|
66
|
-
*
|
|
67
|
-
* // Success notification
|
|
68
|
-
* showToast('Customer updated successfully');
|
|
69
|
-
*
|
|
70
|
-
* // Error notification
|
|
71
|
-
* showToast('Failed to save changes', 'error');
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
export declare function showToast(message: string, variant?: 'success' | 'error'): void;
|
|
75
|
-
/**
|
|
76
|
-
* Signal to the ManageSpace host that the extension is ready to receive context.
|
|
77
|
-
*
|
|
78
|
-
* Call this after your extension has loaded and set up its message listeners.
|
|
79
|
-
* The host will respond with a CONTEXT_INIT message containing the ExtensionContext.
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```typescript
|
|
83
|
-
* import { signalReady, getContext } from '@managespace/sdk/extensions';
|
|
84
|
-
*
|
|
85
|
-
* // Signal ready and wait for context
|
|
86
|
-
* signalReady();
|
|
87
|
-
* const context = await getContext();
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
export declare function signalReady(): void;
|
|
91
|
-
/**
|
|
92
|
-
* Subscribe to entity events from the ManageSpace host.
|
|
93
|
-
*
|
|
94
|
-
* The host sends events when entities (customers, assets, etc.) are
|
|
95
|
-
* created, updated, or deleted. Use this to keep your extension in sync.
|
|
96
|
-
*
|
|
97
|
-
* @param handler - Callback function to handle entity events
|
|
98
|
-
* @returns Unsubscribe function to remove the handler
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```typescript
|
|
102
|
-
* import { onEntityEvent } from '@managespace/sdk/extensions';
|
|
103
|
-
*
|
|
104
|
-
* const unsubscribe = onEntityEvent((event) => {
|
|
105
|
-
* if (event.entityType === 'customer' && event.action === 'updated') {
|
|
106
|
-
* console.log('Customer updated:', event.entityId);
|
|
107
|
-
* refreshCustomerData();
|
|
108
|
-
* }
|
|
109
|
-
* });
|
|
110
|
-
*
|
|
111
|
-
* // Later, to stop listening:
|
|
112
|
-
* unsubscribe();
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
export declare function onEntityEvent(handler: EntityEventHandler): () => void;
|
|
116
|
-
/**
|
|
117
|
-
* Create a configured fetch function for calling the ManageSpace API.
|
|
118
|
-
*
|
|
119
|
-
* This returns a fetch wrapper that automatically includes credentials
|
|
120
|
-
* and sets the correct headers for API calls.
|
|
121
|
-
*
|
|
122
|
-
* @param context - The extension context from getContext()
|
|
123
|
-
* @returns A fetch function configured for ManageSpace API calls
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* ```typescript
|
|
127
|
-
* import { getContext, createApiFetch } from '@managespace/sdk/extensions';
|
|
128
|
-
*
|
|
129
|
-
* const context = await getContext();
|
|
130
|
-
* const apiFetch = createApiFetch(context);
|
|
131
|
-
*
|
|
132
|
-
* // Fetch customers
|
|
133
|
-
* const response = await apiFetch('/api/crm/customers/queries', {
|
|
134
|
-
* method: 'POST',
|
|
135
|
-
* body: JSON.stringify({
|
|
136
|
-
* pageOptions: { offset: 0, limit: 20 }
|
|
137
|
-
* })
|
|
138
|
-
* });
|
|
139
|
-
* const data = await response.json();
|
|
140
|
-
* ```
|
|
141
|
-
*/
|
|
142
|
-
export declare function createApiFetch(context: ExtensionContext): (path: string, options?: RequestInit) => Promise<Response>;
|
|
143
|
-
/**
|
|
144
|
-
* Create a configured fetch function for calling your extension's BFF.
|
|
145
|
-
*
|
|
146
|
-
* This returns a fetch wrapper that forwards credentials to your BFF,
|
|
147
|
-
* allowing it to make authenticated calls to the ManageSpace API.
|
|
148
|
-
*
|
|
149
|
-
* @param context - The extension context from getContext()
|
|
150
|
-
* @returns A fetch function configured for BFF calls, or null if no BFF is configured
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```typescript
|
|
154
|
-
* import { getContext, createBffFetch } from '@managespace/sdk/extensions';
|
|
155
|
-
*
|
|
156
|
-
* const context = await getContext();
|
|
157
|
-
* const bffFetch = createBffFetch(context);
|
|
158
|
-
*
|
|
159
|
-
* if (bffFetch) {
|
|
160
|
-
* const response = await bffFetch('/api/enriched-customers');
|
|
161
|
-
* const data = await response.json();
|
|
162
|
-
* }
|
|
163
|
-
* ```
|
|
164
|
-
*/
|
|
165
|
-
export declare function createBffFetch(context: ExtensionContext): ((path: string, options?: RequestInit) => Promise<Response>) | null;
|
|
166
|
-
//# sourceMappingURL=host-bridge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"host-bridge.d.ts","sourceRoot":"","sources":["../../src/extensions/host-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,kBAAkB,EAClB,gBAAgB,EAGnB,MAAM,SAAS,CAAC;AAiCjB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAQtD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,IAAI,gBAAgB,GAAG,IAAI,CAE3D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAM3C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACrB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,SAAS,GAAG,OAAmB,GACzC,IAAI,CAMN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAGlC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI,CAKrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAC1B,OAAO,EAAE,gBAAgB,GAC1B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAY5D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC1B,OAAO,EAAE,gBAAgB,GAC1B,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAgBrE"}
|