@epilot/sdk 2.0.3 → 2.0.4
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/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +663 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +1711 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +4443 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +4850 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +837 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +3376 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +15000 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +484 -0
- package/definitions/data-management-runtime.json +1 -0
- package/definitions/data-management.json +962 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +183 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1423 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +2627 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1419 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +10074 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +363 -0
- package/definitions/erp-integration-runtime.json +1 -0
- package/definitions/erp-integration.json +5845 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1051 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +2842 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2341 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +929 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +2660 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +2321 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1531 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1425 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +629 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +1718 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1480 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +9884 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +1474 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1408 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +2408 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +1491 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1525 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3417 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4106 -0
- package/dist/apis/access-token.cjs +7 -7
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +7 -7
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +7 -7
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +7 -7
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +7 -7
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +7 -7
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +7 -7
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +7 -7
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +7 -7
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/consent.cjs +7 -7
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +7 -7
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +7 -7
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-management.cjs +7 -7
- package/dist/apis/data-management.d.cts +2 -2
- package/dist/apis/data-management.d.ts +2 -2
- package/dist/apis/data-management.js +1 -1
- package/dist/apis/deduplication.cjs +7 -7
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +7 -7
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +7 -7
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +7 -7
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +7 -7
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +7 -7
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +8 -8
- package/dist/apis/entity.d.cts +2 -2
- package/dist/apis/entity.d.ts +2 -2
- package/dist/apis/entity.js +2 -2
- package/dist/apis/environments.cjs +7 -7
- package/dist/apis/environments.js +1 -1
- package/dist/apis/erp-integration.cjs +7 -7
- package/dist/apis/erp-integration.js +1 -1
- package/dist/apis/event-catalog.cjs +7 -7
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +7 -7
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +7 -7
- package/dist/apis/iban.js +1 -1
- package/dist/apis/journey.cjs +7 -7
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +7 -7
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +7 -7
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +7 -7
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +7 -7
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +7 -7
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +7 -7
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +7 -7
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +7 -7
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +7 -7
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +7 -7
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +7 -7
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/sandbox.cjs +7 -7
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/submission.cjs +7 -7
- package/dist/apis/submission.js +1 -1
- package/dist/apis/targeting.cjs +7 -7
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +7 -7
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +7 -7
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +7 -7
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +7 -7
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +7 -7
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +7 -7
- package/dist/apis/workflow.js +1 -1
- package/dist/bin/cli.js +123 -25
- package/dist/{chunk-QMQNMCOC.js → chunk-XE25WERA.js} +1 -1
- package/dist/{chunk-5LXNSDG2.cjs → chunk-XEQMAKGA.cjs} +1 -1
- package/dist/{data-management.d-pnuiRU2h.d.ts → data-management.d-CkDmJwpx.d.cts} +1 -2
- package/dist/{data-management.d-pnuiRU2h.d.cts → data-management.d-CkDmJwpx.d.ts} +1 -2
- package/dist/{entity.d-CrtZaZr8.d.cts → entity.d-DtiajmaY.d.cts} +292 -10
- package/dist/{entity.d-CrtZaZr8.d.ts → entity.d-DtiajmaY.d.ts} +292 -10
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/js-yaml-UPZKYVRY.js +2645 -0
- package/package.json +11 -10
- package/LICENSE +0 -21
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Billing API",
|
|
5
|
+
"description": "API to manage billing data for epilot contracts and orders",
|
|
6
|
+
"version": "1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Billing Events",
|
|
11
|
+
"description": "Manage installments, payments and reimbursements"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Contracts",
|
|
15
|
+
"description": "Manage contracts within 360"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Balance",
|
|
19
|
+
"description": "Get customer balance"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"security": [
|
|
23
|
+
{
|
|
24
|
+
"EpilotAuth": []
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"paths": {
|
|
28
|
+
"/v1/billing/events": {
|
|
29
|
+
"get": {
|
|
30
|
+
"operationId": "getBillingEvents",
|
|
31
|
+
"summary": "getBillingEvents",
|
|
32
|
+
"description": "Get and filter billing events such as installments and reimbursements.",
|
|
33
|
+
"tags": [
|
|
34
|
+
"Billing Events"
|
|
35
|
+
],
|
|
36
|
+
"parameters": [
|
|
37
|
+
{
|
|
38
|
+
"in": "query",
|
|
39
|
+
"name": "from",
|
|
40
|
+
"required": false,
|
|
41
|
+
"schema": {
|
|
42
|
+
"type": "number",
|
|
43
|
+
"description": "Initial offset to set for the search results",
|
|
44
|
+
"example": 0,
|
|
45
|
+
"default": 0
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"in": "query",
|
|
50
|
+
"name": "size",
|
|
51
|
+
"required": false,
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "number",
|
|
54
|
+
"description": "Size of the search results",
|
|
55
|
+
"example": 100,
|
|
56
|
+
"default": 100
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "entity_id",
|
|
61
|
+
"in": "query",
|
|
62
|
+
"description": "Entity ID to filter billing events by",
|
|
63
|
+
"required": false,
|
|
64
|
+
"schema": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "event_type",
|
|
73
|
+
"in": "query",
|
|
74
|
+
"schema": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"installment",
|
|
78
|
+
"reimbursement"
|
|
79
|
+
],
|
|
80
|
+
"description": "Type of billing event to filter by"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "date_after",
|
|
85
|
+
"in": "query",
|
|
86
|
+
"schema": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": "date-time",
|
|
89
|
+
"description": "List billing events after this date"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "date_before",
|
|
94
|
+
"in": "query",
|
|
95
|
+
"schema": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "date-time",
|
|
98
|
+
"description": "List billing events before this date"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"responses": {
|
|
103
|
+
"200": {
|
|
104
|
+
"description": "List of billing events",
|
|
105
|
+
"content": {
|
|
106
|
+
"application/json": {
|
|
107
|
+
"schema": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"hits": {
|
|
111
|
+
"type": "integer"
|
|
112
|
+
},
|
|
113
|
+
"results": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"post": {
|
|
127
|
+
"operationId": "createBillingEvent",
|
|
128
|
+
"summary": "createBillingEvent",
|
|
129
|
+
"description": "Create a new billing event.",
|
|
130
|
+
"tags": [
|
|
131
|
+
"Billing Events"
|
|
132
|
+
],
|
|
133
|
+
"requestBody": {
|
|
134
|
+
"required": true,
|
|
135
|
+
"content": {
|
|
136
|
+
"application/json": {
|
|
137
|
+
"schema": {
|
|
138
|
+
"allOf": [
|
|
139
|
+
{
|
|
140
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"responses": {
|
|
148
|
+
"201": {
|
|
149
|
+
"description": "Billing event created successfully",
|
|
150
|
+
"content": {
|
|
151
|
+
"application/json": {
|
|
152
|
+
"schema": {
|
|
153
|
+
"allOf": [
|
|
154
|
+
{
|
|
155
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"/v1/billing/events/{id}": {
|
|
166
|
+
"get": {
|
|
167
|
+
"operationId": "getBillingEvent",
|
|
168
|
+
"summary": "getBillingEvent",
|
|
169
|
+
"description": "Get a single billing event by ID.",
|
|
170
|
+
"tags": [
|
|
171
|
+
"Billing Events"
|
|
172
|
+
],
|
|
173
|
+
"parameters": [
|
|
174
|
+
{
|
|
175
|
+
"name": "id",
|
|
176
|
+
"in": "path",
|
|
177
|
+
"required": true,
|
|
178
|
+
"description": "ID of the billing event to get",
|
|
179
|
+
"schema": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"responses": {
|
|
185
|
+
"200": {
|
|
186
|
+
"description": "Billing Event",
|
|
187
|
+
"content": {
|
|
188
|
+
"application/json": {
|
|
189
|
+
"schema": {
|
|
190
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"patch": {
|
|
198
|
+
"operationId": "updateBillingEvent",
|
|
199
|
+
"summary": "updateBillingEvent",
|
|
200
|
+
"description": "Update an existing billing event.",
|
|
201
|
+
"tags": [
|
|
202
|
+
"Billing Events"
|
|
203
|
+
],
|
|
204
|
+
"parameters": [
|
|
205
|
+
{
|
|
206
|
+
"name": "id",
|
|
207
|
+
"in": "path",
|
|
208
|
+
"required": true,
|
|
209
|
+
"description": "ID of the billing event to update",
|
|
210
|
+
"schema": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"requestBody": {
|
|
216
|
+
"required": true,
|
|
217
|
+
"content": {
|
|
218
|
+
"application/json": {
|
|
219
|
+
"schema": {
|
|
220
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"responses": {
|
|
226
|
+
"200": {
|
|
227
|
+
"description": "Billing Event updated successfully",
|
|
228
|
+
"content": {
|
|
229
|
+
"application/json": {
|
|
230
|
+
"schema": {
|
|
231
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"delete": {
|
|
239
|
+
"operationId": "deleteBillingEvent",
|
|
240
|
+
"summary": "deleteBillingEvent",
|
|
241
|
+
"description": "Delete an existing billing event.",
|
|
242
|
+
"tags": [
|
|
243
|
+
"Billing Events"
|
|
244
|
+
],
|
|
245
|
+
"parameters": [
|
|
246
|
+
{
|
|
247
|
+
"name": "id",
|
|
248
|
+
"in": "path",
|
|
249
|
+
"required": true,
|
|
250
|
+
"description": "ID of the billing event to delete",
|
|
251
|
+
"schema": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"responses": {
|
|
257
|
+
"204": {
|
|
258
|
+
"description": "Billing Event deleted successfully"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"/v1/billing/external/{external_id}": {
|
|
264
|
+
"get": {
|
|
265
|
+
"operationId": "getBillingEventByExternalId",
|
|
266
|
+
"summary": "getBillingEventByExternalId",
|
|
267
|
+
"description": "Get a single billing event by External ID.",
|
|
268
|
+
"tags": [
|
|
269
|
+
"Billing Events"
|
|
270
|
+
],
|
|
271
|
+
"parameters": [
|
|
272
|
+
{
|
|
273
|
+
"name": "external_id",
|
|
274
|
+
"in": "path",
|
|
275
|
+
"required": true,
|
|
276
|
+
"description": "ID of the billing event to get",
|
|
277
|
+
"schema": {
|
|
278
|
+
"type": "string"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"responses": {
|
|
283
|
+
"200": {
|
|
284
|
+
"description": "Billing Event",
|
|
285
|
+
"content": {
|
|
286
|
+
"application/json": {
|
|
287
|
+
"schema": {
|
|
288
|
+
"$ref": "#/components/schemas/BillingEvent"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"/v1/billing/contracts": {
|
|
297
|
+
"post": {
|
|
298
|
+
"operationId": "createContractEntity",
|
|
299
|
+
"summary": "createContractEntity",
|
|
300
|
+
"description": "Create a new contract entity.",
|
|
301
|
+
"tags": [
|
|
302
|
+
"Contracts"
|
|
303
|
+
],
|
|
304
|
+
"requestBody": {
|
|
305
|
+
"required": true,
|
|
306
|
+
"content": {
|
|
307
|
+
"application/json": {
|
|
308
|
+
"schema": {
|
|
309
|
+
"$ref": "#/components/schemas/Contract"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"responses": {
|
|
315
|
+
"201": {
|
|
316
|
+
"description": "Contract created successfully",
|
|
317
|
+
"content": {
|
|
318
|
+
"application/json": {
|
|
319
|
+
"schema": {
|
|
320
|
+
"$ref": "#/components/schemas/ContractItem"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"/v1/billing/contracts/{id}": {
|
|
329
|
+
"patch": {
|
|
330
|
+
"operationId": "updateContractEntity",
|
|
331
|
+
"summary": "updateContractEntity",
|
|
332
|
+
"description": "Update an existing contract entity.",
|
|
333
|
+
"tags": [
|
|
334
|
+
"Contracts"
|
|
335
|
+
],
|
|
336
|
+
"parameters": [
|
|
337
|
+
{
|
|
338
|
+
"name": "id",
|
|
339
|
+
"in": "path",
|
|
340
|
+
"required": true,
|
|
341
|
+
"description": "ID of the contract entity to update",
|
|
342
|
+
"schema": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"requestBody": {
|
|
348
|
+
"required": true,
|
|
349
|
+
"content": {
|
|
350
|
+
"application/json": {
|
|
351
|
+
"schema": {
|
|
352
|
+
"$ref": "#/components/schemas/Contract"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"responses": {
|
|
358
|
+
"200": {
|
|
359
|
+
"description": "Contract updated successfully",
|
|
360
|
+
"content": {
|
|
361
|
+
"application/json": {
|
|
362
|
+
"schema": {
|
|
363
|
+
"$ref": "#/components/schemas/ContractItem"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"delete": {
|
|
371
|
+
"operationId": "deleteContractEntity",
|
|
372
|
+
"summary": "deleteContractEntity",
|
|
373
|
+
"description": "Delete an existing contract entity.",
|
|
374
|
+
"tags": [
|
|
375
|
+
"Contracts"
|
|
376
|
+
],
|
|
377
|
+
"parameters": [
|
|
378
|
+
{
|
|
379
|
+
"name": "id",
|
|
380
|
+
"in": "path",
|
|
381
|
+
"required": true,
|
|
382
|
+
"description": "ID of the contract entity to delete",
|
|
383
|
+
"schema": {
|
|
384
|
+
"type": "string"
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"responses": {
|
|
389
|
+
"204": {
|
|
390
|
+
"description": "Contract deleted successfully",
|
|
391
|
+
"content": {
|
|
392
|
+
"application/json": {
|
|
393
|
+
"schema": {
|
|
394
|
+
"$ref": "#/components/schemas/ContractItem"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"/v1/billing/customers/{id}/balance": {
|
|
403
|
+
"get": {
|
|
404
|
+
"operationId": "getCustomerBalance",
|
|
405
|
+
"summary": "getCustomerBalance",
|
|
406
|
+
"description": "Get total balance across all contracts and orders of a customer entity.",
|
|
407
|
+
"tags": [
|
|
408
|
+
"Balance"
|
|
409
|
+
],
|
|
410
|
+
"parameters": [
|
|
411
|
+
{
|
|
412
|
+
"name": "id",
|
|
413
|
+
"in": "path",
|
|
414
|
+
"description": "Customer entity ID (contact or account)",
|
|
415
|
+
"required": true,
|
|
416
|
+
"schema": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"example": "1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"responses": {
|
|
423
|
+
"200": {
|
|
424
|
+
"description": "OK",
|
|
425
|
+
"content": {
|
|
426
|
+
"application/json": {
|
|
427
|
+
"schema": {
|
|
428
|
+
"$ref": "#/components/schemas/Balance"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"components": {
|
|
438
|
+
"securitySchemes": {
|
|
439
|
+
"EpilotAuth": {
|
|
440
|
+
"type": "http",
|
|
441
|
+
"scheme": "bearer",
|
|
442
|
+
"description": "Epilot 360 Bearer Token",
|
|
443
|
+
"bearerFormat": "JWT"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"schemas": {
|
|
447
|
+
"BaseEntity": {
|
|
448
|
+
"type": "object",
|
|
449
|
+
"additionalProperties": true,
|
|
450
|
+
"properties": {
|
|
451
|
+
"_id": {
|
|
452
|
+
"$ref": "#/components/schemas/EntityId"
|
|
453
|
+
},
|
|
454
|
+
"_title": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"description": "Title of entity"
|
|
457
|
+
},
|
|
458
|
+
"_org": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"description": "Organization Id the entity belongs to"
|
|
461
|
+
},
|
|
462
|
+
"_schema": {
|
|
463
|
+
"$ref": "#/components/schemas/EntitySlug"
|
|
464
|
+
},
|
|
465
|
+
"_tags": {
|
|
466
|
+
"type": "array",
|
|
467
|
+
"items": {
|
|
468
|
+
"type": "string"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"_created_at": {
|
|
472
|
+
"type": "string"
|
|
473
|
+
},
|
|
474
|
+
"_updated_at": {
|
|
475
|
+
"type": "string"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"EntityId": {
|
|
480
|
+
"type": "string",
|
|
481
|
+
"description": "Entity ID",
|
|
482
|
+
"example": "5da0a718-c822-403d-9f5d-20d4584e0528"
|
|
483
|
+
},
|
|
484
|
+
"EntitySlug": {
|
|
485
|
+
"description": "URL-friendly identifier for the entity schema",
|
|
486
|
+
"type": "string",
|
|
487
|
+
"enum": [
|
|
488
|
+
"contact",
|
|
489
|
+
"contract",
|
|
490
|
+
"file",
|
|
491
|
+
"order",
|
|
492
|
+
"opportunity",
|
|
493
|
+
"product",
|
|
494
|
+
"price",
|
|
495
|
+
"meter",
|
|
496
|
+
"meter_counter",
|
|
497
|
+
"billing_event"
|
|
498
|
+
],
|
|
499
|
+
"example": "contact"
|
|
500
|
+
},
|
|
501
|
+
"EntityRelationItem": {
|
|
502
|
+
"type": "object",
|
|
503
|
+
"properties": {
|
|
504
|
+
"entity_id": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "Entity ID for the related contract.",
|
|
507
|
+
"example": "f589786b-3024-43cd-9cb3-5a3c953f2896"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"BaseBillingEvent": {
|
|
512
|
+
"allOf": [
|
|
513
|
+
{
|
|
514
|
+
"$ref": "#/components/schemas/BaseEntity"
|
|
515
|
+
}
|
|
516
|
+
],
|
|
517
|
+
"description": "A base billing event to be inherited by all billing events.",
|
|
518
|
+
"type": "object",
|
|
519
|
+
"required": [
|
|
520
|
+
"type",
|
|
521
|
+
"contract",
|
|
522
|
+
"billing_amount",
|
|
523
|
+
"billing_amount_decimal",
|
|
524
|
+
"billing_currency"
|
|
525
|
+
],
|
|
526
|
+
"additionalProperties": true,
|
|
527
|
+
"properties": {
|
|
528
|
+
"billing_amount": {
|
|
529
|
+
"type": "integer",
|
|
530
|
+
"description": "Amount to be paid in cents i.e. precision 2",
|
|
531
|
+
"example": 10050
|
|
532
|
+
},
|
|
533
|
+
"billing_amount_decimal": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Amount to be paid in cents in decimal string representation",
|
|
536
|
+
"example": "100.50"
|
|
537
|
+
},
|
|
538
|
+
"billing_currency": {
|
|
539
|
+
"$ref": "#/components/schemas/Currency"
|
|
540
|
+
},
|
|
541
|
+
"external_id": {
|
|
542
|
+
"type": "string",
|
|
543
|
+
"description": "Unique identifier for event, used to reference the event to a 3rd party resource such as a SAP Installment.",
|
|
544
|
+
"example": "d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e"
|
|
545
|
+
},
|
|
546
|
+
"contract": {
|
|
547
|
+
"type": "object",
|
|
548
|
+
"properties": {
|
|
549
|
+
"$relation": {
|
|
550
|
+
"type": "array",
|
|
551
|
+
"items": {
|
|
552
|
+
"$ref": "#/components/schemas/EntityRelationItem"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"InstallmentEvent": {
|
|
560
|
+
"description": "An entity that describes an installment billing event.",
|
|
561
|
+
"allOf": [
|
|
562
|
+
{
|
|
563
|
+
"$ref": "#/components/schemas/BaseBillingEvent"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"type": "object",
|
|
567
|
+
"properties": {
|
|
568
|
+
"type": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"enum": [
|
|
571
|
+
"installment"
|
|
572
|
+
],
|
|
573
|
+
"description": "Type of the billing event.",
|
|
574
|
+
"example": "installment"
|
|
575
|
+
},
|
|
576
|
+
"due_date": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"format": "date-time",
|
|
579
|
+
"description": "Date on which the installment is due."
|
|
580
|
+
},
|
|
581
|
+
"paid_date": {
|
|
582
|
+
"type": "string",
|
|
583
|
+
"format": "date-time",
|
|
584
|
+
"description": "Date on which the installment is paid by the customer."
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"required": [
|
|
588
|
+
"due_date"
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
},
|
|
593
|
+
"ReimbursementEvent": {
|
|
594
|
+
"description": "An entity that describes a reimbursement billing event.",
|
|
595
|
+
"allOf": [
|
|
596
|
+
{
|
|
597
|
+
"$ref": "#/components/schemas/BaseBillingEvent"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"type": "object",
|
|
601
|
+
"properties": {
|
|
602
|
+
"type": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"enum": [
|
|
605
|
+
"reimbursement"
|
|
606
|
+
],
|
|
607
|
+
"description": "Type of the billing event.",
|
|
608
|
+
"example": "reimbursement"
|
|
609
|
+
},
|
|
610
|
+
"paid_date": {
|
|
611
|
+
"type": "string",
|
|
612
|
+
"format": "date-time",
|
|
613
|
+
"description": "Date on which the customer is reimbursed."
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
},
|
|
619
|
+
"BillingEvent": {
|
|
620
|
+
"description": "An entity that describes a billing event such as a future installment or a reimbursement back to the customer.",
|
|
621
|
+
"oneOf": [
|
|
622
|
+
{
|
|
623
|
+
"$ref": "#/components/schemas/InstallmentEvent"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"$ref": "#/components/schemas/ReimbursementEvent"
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"Contract": {
|
|
631
|
+
"allOf": [
|
|
632
|
+
{
|
|
633
|
+
"$ref": "#/components/schemas/BaseEntity"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"type": "object",
|
|
637
|
+
"properties": {
|
|
638
|
+
"contract_name": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"description": "The name of the contract.",
|
|
641
|
+
"example": "Grid Contract"
|
|
642
|
+
},
|
|
643
|
+
"contract_number": {
|
|
644
|
+
"type": "string",
|
|
645
|
+
"description": "The unique identifier of the contract.",
|
|
646
|
+
"example": "12345"
|
|
647
|
+
},
|
|
648
|
+
"status": {
|
|
649
|
+
"type": "string",
|
|
650
|
+
"enum": [
|
|
651
|
+
"draft",
|
|
652
|
+
"in_approval_process",
|
|
653
|
+
"approved",
|
|
654
|
+
"active",
|
|
655
|
+
"deactivated",
|
|
656
|
+
"revoked",
|
|
657
|
+
"terminated",
|
|
658
|
+
"expired"
|
|
659
|
+
],
|
|
660
|
+
"default": "draft",
|
|
661
|
+
"description": "The status of the contract.",
|
|
662
|
+
"example": "approved"
|
|
663
|
+
},
|
|
664
|
+
"description": {
|
|
665
|
+
"type": "string",
|
|
666
|
+
"description": "A brief description of the contract.",
|
|
667
|
+
"example": "This contract is for the supply of widgets."
|
|
668
|
+
},
|
|
669
|
+
"account_number": {
|
|
670
|
+
"type": "string",
|
|
671
|
+
"description": "The account number associated with the contract.",
|
|
672
|
+
"example": "67890"
|
|
673
|
+
},
|
|
674
|
+
"branch": {
|
|
675
|
+
"type": "string",
|
|
676
|
+
"enum": [
|
|
677
|
+
"power",
|
|
678
|
+
"gas",
|
|
679
|
+
"water",
|
|
680
|
+
"waste_water",
|
|
681
|
+
"district_heating"
|
|
682
|
+
],
|
|
683
|
+
"description": "The branch associated with the contract.",
|
|
684
|
+
"example": "power"
|
|
685
|
+
},
|
|
686
|
+
"billing_address": {
|
|
687
|
+
"type": "string",
|
|
688
|
+
"description": "The billing address associated with the contract.",
|
|
689
|
+
"example": "123 Main St, Anytown"
|
|
690
|
+
},
|
|
691
|
+
"delivery_address": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"description": "The delivery address associated with the contract.",
|
|
694
|
+
"example": "456 Elm St, Anytown"
|
|
695
|
+
},
|
|
696
|
+
"additional_addresses": {
|
|
697
|
+
"type": "string",
|
|
698
|
+
"description": "Any additional addresses associated with the contract.",
|
|
699
|
+
"example": "789 Oak St, Anytown"
|
|
700
|
+
},
|
|
701
|
+
"termination_date": {
|
|
702
|
+
"type": "string",
|
|
703
|
+
"description": "The date on which the contract was terminated.",
|
|
704
|
+
"example": "2022-01-01"
|
|
705
|
+
},
|
|
706
|
+
"termination_reason": {
|
|
707
|
+
"type": "string",
|
|
708
|
+
"description": "The reason for the termination of the contract.",
|
|
709
|
+
"example": "Non-payment"
|
|
710
|
+
},
|
|
711
|
+
"billing_period": {
|
|
712
|
+
"type": "string",
|
|
713
|
+
"enum": [
|
|
714
|
+
"weekly",
|
|
715
|
+
"monthly",
|
|
716
|
+
"every_quarter",
|
|
717
|
+
"every_6_months",
|
|
718
|
+
"yearly"
|
|
719
|
+
],
|
|
720
|
+
"default": "weekly",
|
|
721
|
+
"description": "The billing period associated with the contract.",
|
|
722
|
+
"example": "monthly"
|
|
723
|
+
},
|
|
724
|
+
"billing_duration_amount": {
|
|
725
|
+
"type": "number",
|
|
726
|
+
"minimum": 0,
|
|
727
|
+
"description": "The duration of the billing period.",
|
|
728
|
+
"example": 30
|
|
729
|
+
},
|
|
730
|
+
"renewal_duration_amount": {
|
|
731
|
+
"type": "number",
|
|
732
|
+
"minimum": 0,
|
|
733
|
+
"description": "The duration of the renewal period.",
|
|
734
|
+
"example": 365
|
|
735
|
+
},
|
|
736
|
+
"renewal_duration_unit": {
|
|
737
|
+
"type": "string",
|
|
738
|
+
"enum": [
|
|
739
|
+
"weeks",
|
|
740
|
+
"months",
|
|
741
|
+
"years"
|
|
742
|
+
],
|
|
743
|
+
"default": "months",
|
|
744
|
+
"description": "The unit of time for the renewal period.",
|
|
745
|
+
"example": "years"
|
|
746
|
+
},
|
|
747
|
+
"notice_time_amount": {
|
|
748
|
+
"type": "number",
|
|
749
|
+
"minimum": 0,
|
|
750
|
+
"description": "The amount of notice required for termination of the contract.",
|
|
751
|
+
"example": 30
|
|
752
|
+
},
|
|
753
|
+
"notice_time_unit": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"enum": [
|
|
756
|
+
"weeks",
|
|
757
|
+
"months",
|
|
758
|
+
"years"
|
|
759
|
+
],
|
|
760
|
+
"default": "months",
|
|
761
|
+
"description": "The unit of time for the notice period.",
|
|
762
|
+
"example": "months"
|
|
763
|
+
},
|
|
764
|
+
"start_date": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"description": "The start date of the contract.",
|
|
767
|
+
"example": "2021-01-01"
|
|
768
|
+
},
|
|
769
|
+
"billing_due_day": {
|
|
770
|
+
"type": "integer",
|
|
771
|
+
"description": "Defines the day of the month in which the installments are due.",
|
|
772
|
+
"minimum": 1,
|
|
773
|
+
"maximum": 31,
|
|
774
|
+
"example": 2
|
|
775
|
+
},
|
|
776
|
+
"installment_amount": {
|
|
777
|
+
"type": "integer",
|
|
778
|
+
"description": "Set amount for installments in cents. (precision 2)",
|
|
779
|
+
"example": 10050
|
|
780
|
+
},
|
|
781
|
+
"balance": {
|
|
782
|
+
"type": "integer",
|
|
783
|
+
"description": "Current balance of the contract in cents. (precision 2)",
|
|
784
|
+
"example": 8990
|
|
785
|
+
},
|
|
786
|
+
"balance_currency": {
|
|
787
|
+
"$ref": "#/components/schemas/Currency"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
"ContractItem": {
|
|
794
|
+
"allOf": [
|
|
795
|
+
{
|
|
796
|
+
"$ref": "#/components/schemas/Contract"
|
|
797
|
+
}
|
|
798
|
+
],
|
|
799
|
+
"required": [
|
|
800
|
+
"_id",
|
|
801
|
+
"_title",
|
|
802
|
+
"_org",
|
|
803
|
+
"_created_at",
|
|
804
|
+
"_updated_at"
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
"Balance": {
|
|
808
|
+
"type": "object",
|
|
809
|
+
"properties": {
|
|
810
|
+
"balance": {
|
|
811
|
+
"type": "integer",
|
|
812
|
+
"description": "Current balance of the customer in cents. (precision 2)",
|
|
813
|
+
"example": 8990
|
|
814
|
+
},
|
|
815
|
+
"balance_decimal": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"description": "Current balance of the customer in decimal string representation.",
|
|
818
|
+
"example": "89.90"
|
|
819
|
+
},
|
|
820
|
+
"balance_currency": {
|
|
821
|
+
"$ref": "#/components/schemas/Currency"
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"Currency": {
|
|
826
|
+
"type": "string",
|
|
827
|
+
"description": "Currency code in ISO 4217 format",
|
|
828
|
+
"example": "EUR"
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
"servers": [
|
|
833
|
+
{
|
|
834
|
+
"url": "https://billing.sls.epilot.io"
|
|
835
|
+
}
|
|
836
|
+
]
|
|
837
|
+
}
|