@managespace/sdk 0.0.162 → 0.0.164
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/.turbo/turbo-build.log +2 -0
- package/dist/extensibility/functions/project/billing.d.ts +3 -1
- package/dist/extensibility/functions/project/billing.d.ts.map +1 -1
- package/dist/extensibility/functions/project/document.d.ts +14 -1
- package/dist/extensibility/functions/project/document.d.ts.map +1 -1
- package/dist/extensibility/functions/project/document.js +10 -0
- package/dist/extensibility/types/mapped-ports.d.ts +5 -3
- package/dist/extensibility/types/mapped-ports.d.ts.map +1 -1
- package/dist/extensibility/types/step-function-signature.d.ts +1 -6
- package/dist/extensibility/types/step-function-signature.d.ts.map +1 -1
- package/dist/extensibility/types/workflow-step.d.ts +1 -6
- package/dist/extensibility/types/workflow-step.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow-step.d.ts +5 -5
- package/dist/extensibility/workflow/workflow-step.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow-step.js +5 -6
- package/dist/extensibility/workflow/workflow.d.ts +7 -3
- package/dist/extensibility/workflow/workflow.d.ts.map +1 -1
- package/dist/extensibility/workflow/workflow.js +4 -21
- package/dist/generated/apis/default-api.d.ts +31 -31
- package/dist/generated/apis/default-api.d.ts.map +1 -1
- package/dist/generated/apis/default-api.js +85 -85
- package/dist/generated/models/contact.d.ts +0 -7
- package/dist/generated/models/contact.d.ts.map +1 -1
- package/dist/generated/models/contact.js +0 -3
- package/dist/generated/models/create-document.d.ts +12 -6
- package/dist/generated/models/create-document.d.ts.map +1 -1
- package/dist/generated/models/create-document.js +4 -2
- package/dist/generated/models/customer.d.ts +0 -7
- package/dist/generated/models/customer.d.ts.map +1 -1
- package/dist/generated/models/customer.js +0 -3
- package/dist/generated/models/document-signed.d.ts +0 -18
- package/dist/generated/models/document-signed.d.ts.map +1 -1
- package/dist/generated/models/document-signed.js +0 -6
- package/dist/generated/models/document-url.d.ts +6 -0
- package/dist/generated/models/document-url.d.ts.map +1 -1
- package/dist/generated/models/document-url.js +4 -0
- package/dist/generated/models/document.d.ts +39 -0
- package/dist/generated/models/document.d.ts.map +1 -0
- package/dist/generated/models/document.js +55 -0
- package/dist/generated/models/extensibility-function-metadata.d.ts +3 -3
- package/dist/generated/models/extensibility-function-metadata.d.ts.map +1 -1
- package/dist/generated/models/extensibility-function-metadata.js +3 -3
- package/dist/generated/models/get-documents200-response.d.ts +3 -3
- package/dist/generated/models/get-documents200-response.d.ts.map +1 -1
- package/dist/generated/models/get-documents200-response.js +3 -3
- package/dist/generated/models/index.d.ts +1 -6
- package/dist/generated/models/index.d.ts.map +1 -1
- package/dist/generated/models/index.js +1 -6
- package/dist/generated/models/org.d.ts +3 -10
- package/dist/generated/models/org.d.ts.map +1 -1
- package/dist/generated/models/org.js +3 -6
- package/dist/generated/models/site.d.ts +3 -10
- package/dist/generated/models/site.d.ts.map +1 -1
- package/dist/generated/models/site.js +3 -6
- package/dist/generated/models/upload-document.d.ts +6 -30
- package/dist/generated/models/upload-document.d.ts.map +1 -1
- package/dist/generated/models/upload-document.js +4 -14
- package/dist/generated/models/uploaded-document.d.ts +2 -85
- package/dist/generated/models/uploaded-document.d.ts.map +1 -1
- package/dist/generated/models/uploaded-document.js +3 -50
- package/dist/generated/models/uploaded-documents.d.ts +45 -0
- package/dist/generated/models/{document-hierarchy.d.ts.map → uploaded-documents.d.ts.map} +1 -1
- package/dist/generated/models/{document-hierarchy.js → uploaded-documents.js} +14 -14
- package/dist/generated/models/user.d.ts +3 -10
- package/dist/generated/models/user.d.ts.map +1 -1
- package/dist/generated/models/user.js +3 -6
- package/dist/generated/models/workflow-instance.d.ts +0 -6
- package/dist/generated/models/workflow-instance.d.ts.map +1 -1
- package/dist/generated/models/workflow-instance.js +0 -4
- package/dist/generated/models/workflow-step-metadata.d.ts +3 -3
- package/dist/generated/models/workflow-step-metadata.d.ts.map +1 -1
- package/dist/generated/models/workflow-step-metadata.js +3 -3
- package/package.json +2 -3
- package/src/extensibility/functions/project/billing.ts +8 -0
- package/src/extensibility/types/mapped-ports.ts +10 -4
- package/src/extensibility/types/step-function-signature.ts +3 -8
- package/src/extensibility/types/workflow-step.ts +1 -2
- package/src/extensibility/workflow/workflow-step.ts +14 -10
- package/src/extensibility/workflow/workflow.ts +5 -44
- package/src/generated/.openapi-generator/FILES +1 -0
- package/src/generated/apis/default-api.ts +65 -0
- package/src/generated/models/charge.ts +10 -15
- package/src/generated/models/create-charge.ts +10 -15
- package/src/generated/models/create-plan-charge.ts +254 -9
- package/src/generated/models/index.ts +1 -0
- package/src/generated/models/update-plan.ts +107 -0
- package/dist/generated/models/document-hierarchy.d.ts +0 -45
- package/dist/generated/models/project-version1.d.ts +0 -109
- package/dist/generated/models/project-version1.d.ts.map +0 -1
- package/dist/generated/models/project-version1.js +0 -95
- package/dist/generated/models/project2.d.ts +0 -70
- package/dist/generated/models/project2.d.ts.map +0 -1
- package/dist/generated/models/project2.js +0 -74
- package/dist/generated/models/role3.d.ts +0 -59
- package/dist/generated/models/role3.d.ts.map +0 -1
- package/dist/generated/models/role3.js +0 -67
- package/dist/generated/models/roles4.d.ts +0 -32
- package/dist/generated/models/roles4.d.ts.map +0 -1
- package/dist/generated/models/roles4.js +0 -57
- package/dist/generated/models/site-type4.d.ts +0 -46
- package/dist/generated/models/site-type4.d.ts.map +0 -1
- package/dist/generated/models/site-type4.js +0 -58
- package/package.deploy.json +0 -34
|
@@ -33,8 +33,6 @@ function instanceOfWorkflowInstance(value) {
|
|
|
33
33
|
return false;
|
|
34
34
|
if (!('triggeringEventId' in value) || value['triggeringEventId'] === undefined)
|
|
35
35
|
return false;
|
|
36
|
-
if (!('description' in value) || value['description'] === undefined)
|
|
37
|
-
return false;
|
|
38
36
|
if (!('startedAt' in value) || value['startedAt'] === undefined)
|
|
39
37
|
return false;
|
|
40
38
|
if (!('finishedAt' in value) || value['finishedAt'] === undefined)
|
|
@@ -65,7 +63,6 @@ function WorkflowInstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
65
63
|
'site': json['site'] == null ? undefined : (0, site_1.SiteFromJSON)(json['site']),
|
|
66
64
|
'siteId': json['siteId'],
|
|
67
65
|
'triggeringEventId': json['triggeringEventId'],
|
|
68
|
-
'description': json['description'],
|
|
69
66
|
'startedAt': (json['startedAt'] == null ? null : new Date(json['startedAt'])),
|
|
70
67
|
'finishedAt': (json['finishedAt'] == null ? null : new Date(json['finishedAt'])),
|
|
71
68
|
'workflowDefinition': json['workflowDefinition'] == null ? undefined : (0, workflow_definition_1.WorkflowDefinitionFromJSON)(json['workflowDefinition']),
|
|
@@ -94,7 +91,6 @@ function WorkflowInstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
94
91
|
'site': (0, site_1.SiteToJSON)(value['site']),
|
|
95
92
|
'siteId': value['siteId'],
|
|
96
93
|
'triggeringEventId': value['triggeringEventId'],
|
|
97
|
-
'description': value['description'],
|
|
98
94
|
'startedAt': (value['startedAt'] == null ? null : value['startedAt'].toISOString()),
|
|
99
95
|
'finishedAt': (value['finishedAt'] == null ? null : value['finishedAt'].toISOString()),
|
|
100
96
|
'workflowDefinition': (0, workflow_definition_1.WorkflowDefinitionToJSON)(value['workflowDefinition']),
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { Org } from './org';
|
|
13
13
|
import type { WorkflowStepDefinition } from './workflow-step-definition';
|
|
14
|
-
import type {
|
|
14
|
+
import type { ProjectVersion } from './project-version';
|
|
15
15
|
import type { WorkflowStepInstance } from './workflow-step-instance';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
@@ -57,10 +57,10 @@ export interface WorkflowStepMetadata {
|
|
|
57
57
|
description: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
|
-
* @type {
|
|
60
|
+
* @type {ProjectVersion}
|
|
61
61
|
* @memberof WorkflowStepMetadata
|
|
62
62
|
*/
|
|
63
|
-
version?:
|
|
63
|
+
version?: ProjectVersion;
|
|
64
64
|
/**
|
|
65
65
|
* Version ID for the code this step runs on
|
|
66
66
|
* @type {string}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step-metadata.d.ts","sourceRoot":"","sources":["../../../src/generated/models/workflow-step-metadata.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAOzE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"workflow-step-metadata.d.ts","sourceRoot":"","sources":["../../../src/generated/models/workflow-step-metadata.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAOzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAQrE;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACxD;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CACvD;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oBAAoB,CAW3F;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE5E;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,oBAAoB,CAoB/G;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAE1E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CAqB9H"}
|
|
@@ -16,7 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.WorkflowStepMetadataToJSONTyped = exports.WorkflowStepMetadataToJSON = exports.WorkflowStepMetadataFromJSONTyped = exports.WorkflowStepMetadataFromJSON = exports.instanceOfWorkflowStepMetadata = void 0;
|
|
17
17
|
const org_1 = require("./org");
|
|
18
18
|
const workflow_step_definition_1 = require("./workflow-step-definition");
|
|
19
|
-
const
|
|
19
|
+
const project_version_1 = require("./project-version");
|
|
20
20
|
const workflow_step_instance_1 = require("./workflow-step-instance");
|
|
21
21
|
/**
|
|
22
22
|
* Check if a given object implements the WorkflowStepMetadata interface.
|
|
@@ -58,7 +58,7 @@ function WorkflowStepMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
58
58
|
'code': json['code'],
|
|
59
59
|
'name': json['name'],
|
|
60
60
|
'description': json['description'],
|
|
61
|
-
'version': json['version'] == null ? undefined : (0,
|
|
61
|
+
'version': json['version'] == null ? undefined : (0, project_version_1.ProjectVersionFromJSON)(json['version']),
|
|
62
62
|
'versionId': json['versionId'],
|
|
63
63
|
'isPublic': json['isPublic'],
|
|
64
64
|
'ports': json['ports'],
|
|
@@ -83,7 +83,7 @@ function WorkflowStepMetadataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
83
83
|
'code': value['code'],
|
|
84
84
|
'name': value['name'],
|
|
85
85
|
'description': value['description'],
|
|
86
|
-
'version': (0,
|
|
86
|
+
'version': (0, project_version_1.ProjectVersionToJSON)(value['version']),
|
|
87
87
|
'versionId': value['versionId'],
|
|
88
88
|
'isPublic': value['isPublic'],
|
|
89
89
|
'ports': value['ports'],
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@managespace/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.164",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "tsc -w --preserveWatchOutput",
|
|
6
6
|
"build": "tsc",
|
|
7
7
|
"lint:check": "eslint .",
|
|
8
8
|
"lint:fix": "eslint --fix .",
|
|
9
|
-
"lint:fix:cache": "eslint --fix .",
|
|
10
9
|
"upload": "tsc && npm publish"
|
|
11
10
|
},
|
|
12
11
|
"main": "./dist/index.js",
|
|
@@ -31,4 +30,4 @@
|
|
|
31
30
|
"@repo/eslint-config": "*",
|
|
32
31
|
"@repo/typescript-config": "*"
|
|
33
32
|
}
|
|
34
|
-
}
|
|
33
|
+
}
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
CreateSubscription as _CreateSubscription,
|
|
30
30
|
SubscriptionPreview,
|
|
31
31
|
UpdateSubscription as _UpdateSubscription,
|
|
32
|
+
UpdatePlan as _UpdatePlan,
|
|
32
33
|
} from '../../../generated';
|
|
33
34
|
import { CustomCreateContact } from '../../../generated/models/custom-create-contact';
|
|
34
35
|
import { CustomUpdateCustomer } from '../../../generated/models/custom-update-customer';
|
|
@@ -316,4 +317,11 @@ export namespace Billing {
|
|
|
316
317
|
subscriptionId: string;
|
|
317
318
|
} & _UpdateSubscription;
|
|
318
319
|
}
|
|
320
|
+
|
|
321
|
+
export class UpdatePlan implements ExtPlugin {
|
|
322
|
+
responseType!: PlanCustom;
|
|
323
|
+
payload!: {
|
|
324
|
+
planId: string;
|
|
325
|
+
} & _UpdatePlan;
|
|
326
|
+
}
|
|
319
327
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { DefinedWorkflowStep } from '../workflow/workflow-step';
|
|
2
1
|
import { DefaultPorts } from './default-result';
|
|
2
|
+
import { StepFunctionSignature } from './step-function-signature';
|
|
3
3
|
|
|
4
|
-
export type MappedPorts<T extends string
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export type MappedPorts<T extends string> = {
|
|
5
|
+
[K in T]?:
|
|
6
|
+
| StepFunctionSignature
|
|
7
|
+
| DefaultPorts
|
|
8
|
+
| undefined
|
|
9
|
+
| {
|
|
10
|
+
callback: StepFunctionSignature;
|
|
11
|
+
// setDescription: (description: string) => void;
|
|
12
|
+
};
|
|
7
13
|
};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { DefaultApi } from '../../generated';
|
|
2
|
-
import { DefaultPorts } from './default-result';
|
|
3
2
|
import {
|
|
4
3
|
WorkflowStepBasePayload,
|
|
5
4
|
WorkflowStepReturnType,
|
|
6
5
|
} from './workflow-step';
|
|
7
6
|
|
|
8
|
-
export type StepFunctionSignature
|
|
7
|
+
export type StepFunctionSignature = (
|
|
9
8
|
payload: WorkflowStepBasePayload & any,
|
|
10
|
-
api: DefaultApi
|
|
11
|
-
configurationSettings: {
|
|
12
|
-
[key: string]: string | number | boolean | Record<string, unknown>;
|
|
13
|
-
};
|
|
14
|
-
},
|
|
9
|
+
api: DefaultApi,
|
|
15
10
|
state: any,
|
|
16
|
-
) => Promise<WorkflowStepReturnType<
|
|
11
|
+
) => Promise<WorkflowStepReturnType<string>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UserIntervention } from './control';
|
|
2
|
-
import { DefaultPorts } from './default-result';
|
|
3
2
|
|
|
4
3
|
export type WorkflowStepBasePayload = {
|
|
5
4
|
orgId: string;
|
|
@@ -33,7 +32,7 @@ export type WorkflowStepDelay =
|
|
|
33
32
|
minutes: number;
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
export type WorkflowStepReturnType<T
|
|
35
|
+
export type WorkflowStepReturnType<T, A = null> =
|
|
37
36
|
| ({
|
|
38
37
|
result: T;
|
|
39
38
|
state: any;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DefaultApi } from '../../generated';
|
|
2
|
+
import { DefaultPorts } from '../types';
|
|
3
|
+
import {
|
|
4
|
+
WorkflowStepBasePayload,
|
|
5
|
+
WorkflowStepReturnType,
|
|
6
|
+
} from '../types/workflow-step';
|
|
2
7
|
|
|
3
|
-
export
|
|
4
|
-
callback:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
): DefinedWorkflowStep<T> => {
|
|
8
|
+
export const defineWorkflowStep = <T = DefaultPorts>(
|
|
9
|
+
callback: (
|
|
10
|
+
payload: WorkflowStepBasePayload & any,
|
|
11
|
+
api: DefaultApi,
|
|
12
|
+
state: any,
|
|
13
|
+
) => Promise<WorkflowStepReturnType<T>>,
|
|
14
|
+
) => {
|
|
11
15
|
const step = {
|
|
12
16
|
callback,
|
|
13
17
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
-
setDescription: (description: string)
|
|
18
|
+
setDescription: (description: string) => {
|
|
15
19
|
return step;
|
|
16
20
|
},
|
|
17
21
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { CommunicationMethod } from '../functions';
|
|
2
1
|
import { DefaultPorts, ExtPlugin, MappedPorts } from '../types';
|
|
3
|
-
import {
|
|
2
|
+
import { StepFunctionSignature } from '../types/step-function-signature';
|
|
4
3
|
|
|
5
4
|
export const define = <T extends string = DefaultPorts>(
|
|
6
|
-
fn:
|
|
5
|
+
fn: {
|
|
6
|
+
callback: StepFunctionSignature;
|
|
7
|
+
setDescription: (description: string) => void;
|
|
8
|
+
},
|
|
7
9
|
ports: MappedPorts<T>,
|
|
8
10
|
maxRunCount?: number,
|
|
9
11
|
) => {
|
|
@@ -18,44 +20,3 @@ export const defineWorkflow = <T extends ExtPlugin>(...args: any[]) => {
|
|
|
18
20
|
setDescription: (description: string) => {},
|
|
19
21
|
};
|
|
20
22
|
};
|
|
21
|
-
|
|
22
|
-
// type OtherTestPorts = 'four' | 'five' | 'six';
|
|
23
|
-
// const stepTestThree = defineWorkflowStep<testThree>(
|
|
24
|
-
// async (payload, api, state) => {
|
|
25
|
-
// const test3 = api.configurationSettings['test'];
|
|
26
|
-
// return {
|
|
27
|
-
// // result: 'Success',
|
|
28
|
-
// result: '4',
|
|
29
|
-
// state: {},
|
|
30
|
-
// };
|
|
31
|
-
// },
|
|
32
|
-
// ).setDescription('test');
|
|
33
|
-
|
|
34
|
-
type TestPorts = 'one' | 'two' | 'three';
|
|
35
|
-
|
|
36
|
-
const stepTest = defineWorkflowStep<TestPorts>(async (payload, api, state) => {
|
|
37
|
-
return {
|
|
38
|
-
result: 'one',
|
|
39
|
-
state: {},
|
|
40
|
-
};
|
|
41
|
-
}).setDescription('test');
|
|
42
|
-
|
|
43
|
-
const stepTestTwo = defineWorkflowStep<DefaultPorts>(
|
|
44
|
-
async (payload, api, state) => {
|
|
45
|
-
return {
|
|
46
|
-
result: 'Success',
|
|
47
|
-
state: {},
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
).setDescription('test');
|
|
51
|
-
|
|
52
|
-
const defineTest = defineWorkflow<CommunicationMethod.SendEmail>(
|
|
53
|
-
define<TestPorts>(stepTest, {
|
|
54
|
-
one: stepTestTwo,
|
|
55
|
-
three: stepTest,
|
|
56
|
-
}),
|
|
57
|
-
define<DefaultPorts>(stepTestTwo, {
|
|
58
|
-
ManualInputReceived: stepTest,
|
|
59
|
-
Success: 'End',
|
|
60
|
-
}),
|
|
61
|
-
);
|
|
@@ -194,6 +194,7 @@ models/update-configuration-setting.ts
|
|
|
194
194
|
models/update-map-feature.ts
|
|
195
195
|
models/update-note.ts
|
|
196
196
|
models/update-org.ts
|
|
197
|
+
models/update-plan.ts
|
|
197
198
|
models/update-smart-bar-prompt.ts
|
|
198
199
|
models/update-subscription-charge.ts
|
|
199
200
|
models/update-subscription.ts
|
|
@@ -146,6 +146,7 @@ import type {
|
|
|
146
146
|
UpdateMapFeature,
|
|
147
147
|
UpdateNote,
|
|
148
148
|
UpdateOrg,
|
|
149
|
+
UpdatePlan,
|
|
149
150
|
UpdateSmartBarPrompt,
|
|
150
151
|
UpdateSubscription,
|
|
151
152
|
UpdateUserProperties,
|
|
@@ -423,6 +424,8 @@ import {
|
|
|
423
424
|
UpdateNoteToJSON,
|
|
424
425
|
UpdateOrgFromJSON,
|
|
425
426
|
UpdateOrgToJSON,
|
|
427
|
+
UpdatePlanFromJSON,
|
|
428
|
+
UpdatePlanToJSON,
|
|
426
429
|
UpdateSmartBarPromptFromJSON,
|
|
427
430
|
UpdateSmartBarPromptToJSON,
|
|
428
431
|
UpdateSubscriptionFromJSON,
|
|
@@ -1169,6 +1172,12 @@ export interface UpdateOrgRequest {
|
|
|
1169
1172
|
updateOrg: UpdateOrg;
|
|
1170
1173
|
}
|
|
1171
1174
|
|
|
1175
|
+
export interface UpdatePlanRequest {
|
|
1176
|
+
siteId: string;
|
|
1177
|
+
planId: string;
|
|
1178
|
+
updatePlan: UpdatePlan;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1172
1181
|
export interface UpdateSiteRequest {
|
|
1173
1182
|
siteId: string;
|
|
1174
1183
|
createSiteCustom: CreateSiteCustom;
|
|
@@ -7625,6 +7634,62 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
7625
7634
|
return await response.value();
|
|
7626
7635
|
}
|
|
7627
7636
|
|
|
7637
|
+
/**
|
|
7638
|
+
*/
|
|
7639
|
+
async updatePlanRaw(requestParameters: UpdatePlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlanCustom>> {
|
|
7640
|
+
if (requestParameters['siteId'] == null) {
|
|
7641
|
+
throw new runtime.RequiredError(
|
|
7642
|
+
'siteId',
|
|
7643
|
+
'Required parameter "siteId" was null or undefined when calling updatePlan().'
|
|
7644
|
+
);
|
|
7645
|
+
}
|
|
7646
|
+
|
|
7647
|
+
if (requestParameters['planId'] == null) {
|
|
7648
|
+
throw new runtime.RequiredError(
|
|
7649
|
+
'planId',
|
|
7650
|
+
'Required parameter "planId" was null or undefined when calling updatePlan().'
|
|
7651
|
+
);
|
|
7652
|
+
}
|
|
7653
|
+
|
|
7654
|
+
if (requestParameters['updatePlan'] == null) {
|
|
7655
|
+
throw new runtime.RequiredError(
|
|
7656
|
+
'updatePlan',
|
|
7657
|
+
'Required parameter "updatePlan" was null or undefined when calling updatePlan().'
|
|
7658
|
+
);
|
|
7659
|
+
}
|
|
7660
|
+
|
|
7661
|
+
const queryParameters: any = {};
|
|
7662
|
+
|
|
7663
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
7664
|
+
|
|
7665
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
7666
|
+
|
|
7667
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7668
|
+
const token = this.configuration.accessToken;
|
|
7669
|
+
const tokenString = await token("bearer", []);
|
|
7670
|
+
|
|
7671
|
+
if (tokenString) {
|
|
7672
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
7673
|
+
}
|
|
7674
|
+
}
|
|
7675
|
+
const response = await this.request({
|
|
7676
|
+
path: `/api/sites/{siteId}/plans`.replace(`{${"siteId"}}`, encodeURIComponent(String(requestParameters['siteId']))).replace(`{${"planId"}}`, encodeURIComponent(String(requestParameters['planId']))),
|
|
7677
|
+
method: 'PUT',
|
|
7678
|
+
headers: headerParameters,
|
|
7679
|
+
query: queryParameters,
|
|
7680
|
+
body: UpdatePlanToJSON(requestParameters['updatePlan']),
|
|
7681
|
+
}, initOverrides);
|
|
7682
|
+
|
|
7683
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlanCustomFromJSON(jsonValue));
|
|
7684
|
+
}
|
|
7685
|
+
|
|
7686
|
+
/**
|
|
7687
|
+
*/
|
|
7688
|
+
async updatePlan(requestParameters: UpdatePlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlanCustom> {
|
|
7689
|
+
const response = await this.updatePlanRaw(requestParameters, initOverrides);
|
|
7690
|
+
return await response.value();
|
|
7691
|
+
}
|
|
7692
|
+
|
|
7628
7693
|
/**
|
|
7629
7694
|
*/
|
|
7630
7695
|
async updateSiteRaw(requestParameters: UpdateSiteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Site>> {
|
|
@@ -57,7 +57,7 @@ export interface Charge {
|
|
|
57
57
|
* @type {string}
|
|
58
58
|
* @memberof Charge
|
|
59
59
|
*/
|
|
60
|
-
type
|
|
60
|
+
type?: string;
|
|
61
61
|
/**
|
|
62
62
|
* timing of one-time charge, to process at start of contract or termination
|
|
63
63
|
* @type {string}
|
|
@@ -87,13 +87,13 @@ export interface Charge {
|
|
|
87
87
|
* @type {string}
|
|
88
88
|
* @memberof Charge
|
|
89
89
|
*/
|
|
90
|
-
pricingModel
|
|
90
|
+
pricingModel?: string;
|
|
91
91
|
/**
|
|
92
92
|
* Original unit price of charge
|
|
93
93
|
* @type {string}
|
|
94
94
|
* @memberof Charge
|
|
95
95
|
*/
|
|
96
|
-
listPrice
|
|
96
|
+
listPrice?: string;
|
|
97
97
|
/**
|
|
98
98
|
* For recurring charges, time of charges
|
|
99
99
|
* @type {string}
|
|
@@ -153,7 +153,7 @@ export interface Charge {
|
|
|
153
153
|
* @type {number}
|
|
154
154
|
* @memberof Charge
|
|
155
155
|
*/
|
|
156
|
-
includedUnits
|
|
156
|
+
includedUnits?: number;
|
|
157
157
|
/**
|
|
158
158
|
* Unused prepayment units remaining for charge
|
|
159
159
|
* @type {number}
|
|
@@ -219,7 +219,7 @@ export interface Charge {
|
|
|
219
219
|
* @type {boolean}
|
|
220
220
|
* @memberof Charge
|
|
221
221
|
*/
|
|
222
|
-
defaultFromProduct
|
|
222
|
+
defaultFromProduct?: boolean;
|
|
223
223
|
/**
|
|
224
224
|
* Revenue Rule ID
|
|
225
225
|
* @type {string}
|
|
@@ -258,11 +258,6 @@ export interface Charge {
|
|
|
258
258
|
export function instanceOfCharge(value: object): value is Charge {
|
|
259
259
|
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
260
260
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
261
|
-
if (!('type' in value) || value['type'] === undefined) return false;
|
|
262
|
-
if (!('pricingModel' in value) || value['pricingModel'] === undefined) return false;
|
|
263
|
-
if (!('listPrice' in value) || value['listPrice'] === undefined) return false;
|
|
264
|
-
if (!('includedUnits' in value) || value['includedUnits'] === undefined) return false;
|
|
265
|
-
if (!('defaultFromProduct' in value) || value['defaultFromProduct'] === undefined) return false;
|
|
266
261
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
267
262
|
if (!('chargeBillingDate' in value) || value['chargeBillingDate'] === undefined) return false;
|
|
268
263
|
return true;
|
|
@@ -281,13 +276,13 @@ export function ChargeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ch
|
|
|
281
276
|
'productId': json['productId'],
|
|
282
277
|
'name': json['name'],
|
|
283
278
|
'description': json['description'] == null ? undefined : json['description'],
|
|
284
|
-
'type': json['type'],
|
|
279
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
285
280
|
'timing': json['timing'] == null ? undefined : json['timing'],
|
|
286
281
|
'effectiveDate': json['effectiveDate'] == null ? undefined : json['effectiveDate'],
|
|
287
282
|
'billingDate': json['billingDate'] == null ? undefined : json['billingDate'],
|
|
288
283
|
'completionDate': json['completionDate'] == null ? undefined : json['completionDate'],
|
|
289
|
-
'pricingModel': json['pricingModel'],
|
|
290
|
-
'listPrice': json['listPrice'],
|
|
284
|
+
'pricingModel': json['pricingModel'] == null ? undefined : json['pricingModel'],
|
|
285
|
+
'listPrice': json['listPrice'] == null ? undefined : json['listPrice'],
|
|
291
286
|
'chargeTiming': json['chargeTiming'] == null ? undefined : json['chargeTiming'],
|
|
292
287
|
'listPriceBase': json['listPriceBase'] == null ? undefined : json['listPriceBase'],
|
|
293
288
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -297,7 +292,7 @@ export function ChargeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ch
|
|
|
297
292
|
'prepaymentPeriods': json['prepaymentPeriods'] == null ? undefined : json['prepaymentPeriods'],
|
|
298
293
|
'prepaymentAmount': json['prepaymentAmount'] == null ? undefined : json['prepaymentAmount'],
|
|
299
294
|
'unitOfMeasure': json['unitOfMeasure'] == null ? undefined : json['unitOfMeasure'],
|
|
300
|
-
'includedUnits': json['includedUnits'],
|
|
295
|
+
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
301
296
|
'unusedPrepaymentUnits': json['unusedPrepaymentUnits'] == null ? undefined : json['unusedPrepaymentUnits'],
|
|
302
297
|
'tiers': json['tiers'] == null ? undefined : ((json['tiers'] as Array<any>).map(ChargeTierFromJSON)),
|
|
303
298
|
'backchargeCurrentPeriod': json['backchargeCurrentPeriod'] == null ? undefined : json['backchargeCurrentPeriod'],
|
|
@@ -308,7 +303,7 @@ export function ChargeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ch
|
|
|
308
303
|
'refillPrepaidUnitsFor': json['refillPrepaidUnitsFor'] == null ? undefined : json['refillPrepaidUnitsFor'],
|
|
309
304
|
'prepaidUnitsExpiry': json['prepaidUnitsExpiry'] == null ? undefined : json['prepaidUnitsExpiry'],
|
|
310
305
|
'refundUnitsOnCancel': json['refundUnitsOnCancel'] == null ? undefined : json['refundUnitsOnCancel'],
|
|
311
|
-
'defaultFromProduct': json['defaultFromProduct'],
|
|
306
|
+
'defaultFromProduct': json['defaultFromProduct'] == null ? undefined : json['defaultFromProduct'],
|
|
312
307
|
'revenueRuleId': json['revenueRuleId'] == null ? undefined : json['revenueRuleId'],
|
|
313
308
|
'recognitionStartDate': json['recognitionStartDate'] == null ? undefined : json['recognitionStartDate'],
|
|
314
309
|
'transactionPostingEntries': json['transactionPostingEntries'] == null ? undefined : ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
|
|
@@ -57,7 +57,7 @@ export interface CreateCharge {
|
|
|
57
57
|
* @type {string}
|
|
58
58
|
* @memberof CreateCharge
|
|
59
59
|
*/
|
|
60
|
-
type
|
|
60
|
+
type?: string;
|
|
61
61
|
/**
|
|
62
62
|
* timing of one-time charge, to process at start of contract or termination
|
|
63
63
|
* @type {string}
|
|
@@ -87,13 +87,13 @@ export interface CreateCharge {
|
|
|
87
87
|
* @type {string}
|
|
88
88
|
* @memberof CreateCharge
|
|
89
89
|
*/
|
|
90
|
-
pricingModel
|
|
90
|
+
pricingModel?: string;
|
|
91
91
|
/**
|
|
92
92
|
* Original unit price of charge
|
|
93
93
|
* @type {string}
|
|
94
94
|
* @memberof CreateCharge
|
|
95
95
|
*/
|
|
96
|
-
listPrice
|
|
96
|
+
listPrice?: string;
|
|
97
97
|
/**
|
|
98
98
|
* For recurring charges, time of charges
|
|
99
99
|
* @type {string}
|
|
@@ -153,7 +153,7 @@ export interface CreateCharge {
|
|
|
153
153
|
* @type {number}
|
|
154
154
|
* @memberof CreateCharge
|
|
155
155
|
*/
|
|
156
|
-
includedUnits
|
|
156
|
+
includedUnits?: number;
|
|
157
157
|
/**
|
|
158
158
|
* Unused prepayment units remaining for charge
|
|
159
159
|
* @type {number}
|
|
@@ -219,7 +219,7 @@ export interface CreateCharge {
|
|
|
219
219
|
* @type {boolean}
|
|
220
220
|
* @memberof CreateCharge
|
|
221
221
|
*/
|
|
222
|
-
defaultFromProduct
|
|
222
|
+
defaultFromProduct?: boolean;
|
|
223
223
|
/**
|
|
224
224
|
* Revenue Rule ID
|
|
225
225
|
* @type {string}
|
|
@@ -246,11 +246,6 @@ export interface CreateCharge {
|
|
|
246
246
|
export function instanceOfCreateCharge(value: object): value is CreateCharge {
|
|
247
247
|
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
248
248
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
249
|
-
if (!('type' in value) || value['type'] === undefined) return false;
|
|
250
|
-
if (!('pricingModel' in value) || value['pricingModel'] === undefined) return false;
|
|
251
|
-
if (!('listPrice' in value) || value['listPrice'] === undefined) return false;
|
|
252
|
-
if (!('includedUnits' in value) || value['includedUnits'] === undefined) return false;
|
|
253
|
-
if (!('defaultFromProduct' in value) || value['defaultFromProduct'] === undefined) return false;
|
|
254
249
|
return true;
|
|
255
250
|
}
|
|
256
251
|
|
|
@@ -267,13 +262,13 @@ export function CreateChargeFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
267
262
|
'productId': json['productId'],
|
|
268
263
|
'name': json['name'],
|
|
269
264
|
'description': json['description'] == null ? undefined : json['description'],
|
|
270
|
-
'type': json['type'],
|
|
265
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
271
266
|
'timing': json['timing'] == null ? undefined : json['timing'],
|
|
272
267
|
'effectiveDate': json['effectiveDate'] == null ? undefined : json['effectiveDate'],
|
|
273
268
|
'billingDate': json['billingDate'] == null ? undefined : json['billingDate'],
|
|
274
269
|
'completionDate': json['completionDate'] == null ? undefined : json['completionDate'],
|
|
275
|
-
'pricingModel': json['pricingModel'],
|
|
276
|
-
'listPrice': json['listPrice'],
|
|
270
|
+
'pricingModel': json['pricingModel'] == null ? undefined : json['pricingModel'],
|
|
271
|
+
'listPrice': json['listPrice'] == null ? undefined : json['listPrice'],
|
|
277
272
|
'chargeTiming': json['chargeTiming'] == null ? undefined : json['chargeTiming'],
|
|
278
273
|
'listPriceBase': json['listPriceBase'] == null ? undefined : json['listPriceBase'],
|
|
279
274
|
'billingPeriod': json['billingPeriod'] == null ? undefined : json['billingPeriod'],
|
|
@@ -283,7 +278,7 @@ export function CreateChargeFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
283
278
|
'prepaymentPeriods': json['prepaymentPeriods'] == null ? undefined : json['prepaymentPeriods'],
|
|
284
279
|
'prepaymentAmount': json['prepaymentAmount'] == null ? undefined : json['prepaymentAmount'],
|
|
285
280
|
'unitOfMeasure': json['unitOfMeasure'] == null ? undefined : json['unitOfMeasure'],
|
|
286
|
-
'includedUnits': json['includedUnits'],
|
|
281
|
+
'includedUnits': json['includedUnits'] == null ? undefined : json['includedUnits'],
|
|
287
282
|
'unusedPrepaymentUnits': json['unusedPrepaymentUnits'] == null ? undefined : json['unusedPrepaymentUnits'],
|
|
288
283
|
'tiers': json['tiers'] == null ? undefined : ((json['tiers'] as Array<any>).map(ChargeTierFromJSON)),
|
|
289
284
|
'backchargeCurrentPeriod': json['backchargeCurrentPeriod'] == null ? undefined : json['backchargeCurrentPeriod'],
|
|
@@ -294,7 +289,7 @@ export function CreateChargeFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
294
289
|
'refillPrepaidUnitsFor': json['refillPrepaidUnitsFor'] == null ? undefined : json['refillPrepaidUnitsFor'],
|
|
295
290
|
'prepaidUnitsExpiry': json['prepaidUnitsExpiry'] == null ? undefined : json['prepaidUnitsExpiry'],
|
|
296
291
|
'refundUnitsOnCancel': json['refundUnitsOnCancel'] == null ? undefined : json['refundUnitsOnCancel'],
|
|
297
|
-
'defaultFromProduct': json['defaultFromProduct'],
|
|
292
|
+
'defaultFromProduct': json['defaultFromProduct'] == null ? undefined : json['defaultFromProduct'],
|
|
298
293
|
'revenueRuleId': json['revenueRuleId'] == null ? undefined : json['revenueRuleId'],
|
|
299
294
|
'recognitionStartDate': json['recognitionStartDate'] == null ? undefined : json['recognitionStartDate'],
|
|
300
295
|
'transactionPostingEntries': json['transactionPostingEntries'] == null ? undefined : ((json['transactionPostingEntries'] as Array<any>).map(TransactionPostingEntriesFromJSON)),
|