@obniz/obniz-now-sdk 0.1.0

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.
Files changed (34) hide show
  1. package/README.md +8 -0
  2. package/dist/ObnizApiError.d.ts +62 -0
  3. package/dist/ObnizNow.d.ts +104 -0
  4. package/dist/ObnizNow.test.d.ts +1 -0
  5. package/dist/ObnizNowApiError.d.ts +62 -0
  6. package/dist/index.browser.mjs +3253 -0
  7. package/dist/index.browser.mjs.map +1 -0
  8. package/dist/index.d.ts +2 -0
  9. package/dist/index.js +3379 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/index.mjs +3376 -0
  12. package/dist/index.mjs.map +1 -0
  13. package/dist/sdk-core/apis/AnalyticsApi.d.ts +35 -0
  14. package/dist/sdk-core/apis/ConnectionModelsApi.d.ts +89 -0
  15. package/dist/sdk-core/apis/ConnectionsApi.d.ts +61 -0
  16. package/dist/sdk-core/apis/ConvertersApi.d.ts +28 -0
  17. package/dist/sdk-core/apis/EventsApi.d.ts +49 -0
  18. package/dist/sdk-core/apis/GroupsApi.d.ts +62 -0
  19. package/dist/sdk-core/apis/InboundConnectionsApi.d.ts +47 -0
  20. package/dist/sdk-core/apis/InboundSourcesApi.d.ts +113 -0
  21. package/dist/sdk-core/apis/IntegrationsApi.d.ts +121 -0
  22. package/dist/sdk-core/apis/IntelligencesApi.d.ts +84 -0
  23. package/dist/sdk-core/apis/IssuesApi.d.ts +63 -0
  24. package/dist/sdk-core/apis/MachineApi.d.ts +142 -0
  25. package/dist/sdk-core/apis/MachinesApi.d.ts +97 -0
  26. package/dist/sdk-core/apis/NotificationsApi.d.ts +72 -0
  27. package/dist/sdk-core/apis/ReportsApi.d.ts +85 -0
  28. package/dist/sdk-core/apis/ThreadsApi.d.ts +165 -0
  29. package/dist/sdk-core/apis/UnitsApi.d.ts +151 -0
  30. package/dist/sdk-core/apis/index.d.ts +17 -0
  31. package/dist/sdk-core/index.d.ts +3 -0
  32. package/dist/sdk-core/models/index.d.ts +5368 -0
  33. package/dist/sdk-core/runtime.d.ts +181 -0
  34. package/package.json +49 -0
@@ -0,0 +1,165 @@
1
+ /**
2
+ * API EN
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { CreateThreadPostResponse, CreateThreadRequest, CreateThreadResponse, GetThreadEntitiesResponse, GetThreadResponse, ListThreadPostsResponse, ListThreadsResponse, UpdateThreadPostRequest, UpdateThreadPostResponse, UpdateThreadRequest, UpdateThreadResponse } from '../models/index';
14
+ export interface ThreadsApiCreateThreadOperationRequest {
15
+ createThreadRequest: CreateThreadRequest;
16
+ }
17
+ export interface ThreadsApiCreateThreadPostRequest {
18
+ id: string;
19
+ content: string;
20
+ entities?: string;
21
+ files?: Array<Blob>;
22
+ }
23
+ export interface ThreadsApiDownloadThreadFileRequest {
24
+ threadId: string;
25
+ fileName: string;
26
+ }
27
+ export interface ThreadsApiGetThreadByIdRequest {
28
+ id: string;
29
+ groupId?: string;
30
+ }
31
+ export interface ThreadsApiGetThreadEntitiesRequest {
32
+ id: string;
33
+ entityType?: GetThreadEntitiesEntityTypeEnum;
34
+ }
35
+ export interface ThreadsApiListThreadPostsRequest {
36
+ id: string;
37
+ }
38
+ export interface ThreadsApiListThreadsRequest {
39
+ limit?: number;
40
+ offset?: number;
41
+ search?: string;
42
+ isOpen?: ListThreadsIsOpenEnum;
43
+ groupId?: string;
44
+ }
45
+ export interface ThreadsApiUpdateThreadOperationRequest {
46
+ id: string;
47
+ updateThreadRequest: UpdateThreadRequest;
48
+ }
49
+ export interface ThreadsApiUpdateThreadPostOperationRequest {
50
+ id: string;
51
+ number: number;
52
+ updateThreadPostRequest: UpdateThreadPostRequest;
53
+ }
54
+ /**
55
+ *
56
+ */
57
+ export declare class ThreadsApi extends runtime.BaseAPI {
58
+ /**
59
+ * Create a new thread (field record). Supports both JSON and multipart/form-data requests. Validation rules: - Title: required, max 255 characters - Content: required, max 1000 characters - Allowed file types: .jpg, .jpeg, .png, .pdf, .csv, .xlsx, .xls - Each entity must have exactly one of: machine_id, issue_id, or event_id **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
60
+ * Create new thread
61
+ */
62
+ createThreadRaw(requestParameters: ThreadsApiCreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateThreadResponse>>;
63
+ /**
64
+ * Create a new thread (field record). Supports both JSON and multipart/form-data requests. Validation rules: - Title: required, max 255 characters - Content: required, max 1000 characters - Allowed file types: .jpg, .jpeg, .png, .pdf, .csv, .xlsx, .xls - Each entity must have exactly one of: machine_id, issue_id, or event_id **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
65
+ * Create new thread
66
+ */
67
+ createThread(requestParameters: ThreadsApiCreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateThreadResponse>;
68
+ /**
69
+ * Create a new post in a thread **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
70
+ * Create thread post
71
+ */
72
+ createThreadPostRaw(requestParameters: ThreadsApiCreateThreadPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateThreadPostResponse>>;
73
+ /**
74
+ * Create a new post in a thread **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
75
+ * Create thread post
76
+ */
77
+ createThreadPost(requestParameters: ThreadsApiCreateThreadPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateThreadPostResponse>;
78
+ /**
79
+ * Download a file attached to a thread post **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
80
+ * Download thread file
81
+ */
82
+ downloadThreadFileRaw(requestParameters: ThreadsApiDownloadThreadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
83
+ /**
84
+ * Download a file attached to a thread post **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
85
+ * Download thread file
86
+ */
87
+ downloadThreadFile(requestParameters: ThreadsApiDownloadThreadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
88
+ /**
89
+ * Get a specific thread by ID **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
90
+ * Get thread by ID
91
+ */
92
+ getThreadByIdRaw(requestParameters: ThreadsApiGetThreadByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetThreadResponse>>;
93
+ /**
94
+ * Get a specific thread by ID **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
95
+ * Get thread by ID
96
+ */
97
+ getThreadById(requestParameters: ThreadsApiGetThreadByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetThreadResponse>;
98
+ /**
99
+ * Get all entities related to a thread (machines, issues, events) **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
100
+ * Get thread entities
101
+ */
102
+ getThreadEntitiesRaw(requestParameters: ThreadsApiGetThreadEntitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetThreadEntitiesResponse>>;
103
+ /**
104
+ * Get all entities related to a thread (machines, issues, events) **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
105
+ * Get thread entities
106
+ */
107
+ getThreadEntities(requestParameters: ThreadsApiGetThreadEntitiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetThreadEntitiesResponse>;
108
+ /**
109
+ * Get posts for a specific thread **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
110
+ * Get thread posts
111
+ */
112
+ listThreadPostsRaw(requestParameters: ThreadsApiListThreadPostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListThreadPostsResponse>>;
113
+ /**
114
+ * Get posts for a specific thread **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
115
+ * Get thread posts
116
+ */
117
+ listThreadPosts(requestParameters: ThreadsApiListThreadPostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListThreadPostsResponse>;
118
+ /**
119
+ * Get threads (field records) associated with the account and group **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
120
+ * Get threads list
121
+ */
122
+ listThreadsRaw(requestParameters: ThreadsApiListThreadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListThreadsResponse>>;
123
+ /**
124
+ * Get threads (field records) associated with the account and group **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:read` permission is required
125
+ * Get threads list
126
+ */
127
+ listThreads(requestParameters?: ThreadsApiListThreadsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListThreadsResponse>;
128
+ /**
129
+ * Update thread (change status) **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
130
+ * Update thread status
131
+ */
132
+ updateThreadRaw(requestParameters: ThreadsApiUpdateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateThreadResponse>>;
133
+ /**
134
+ * Update thread (change status) **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
135
+ * Update thread status
136
+ */
137
+ updateThread(requestParameters: ThreadsApiUpdateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateThreadResponse>;
138
+ /**
139
+ * Update a specific post in a thread **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
140
+ * Update thread post
141
+ */
142
+ updateThreadPostRaw(requestParameters: ThreadsApiUpdateThreadPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateThreadPostResponse>>;
143
+ /**
144
+ * Update a specific post in a thread **Authorization** - API token is required in the `Authorization` header **Permissions** - `threads:write` permission is required
145
+ * Update thread post
146
+ */
147
+ updateThreadPost(requestParameters: ThreadsApiUpdateThreadPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateThreadPostResponse>;
148
+ }
149
+ /**
150
+ * @export
151
+ */
152
+ export declare const GetThreadEntitiesEntityTypeEnum: {
153
+ readonly Machine: "machine";
154
+ readonly Issue: "issue";
155
+ readonly Event: "event";
156
+ };
157
+ export type GetThreadEntitiesEntityTypeEnum = typeof GetThreadEntitiesEntityTypeEnum[keyof typeof GetThreadEntitiesEntityTypeEnum];
158
+ /**
159
+ * @export
160
+ */
161
+ export declare const ListThreadsIsOpenEnum: {
162
+ readonly True: "true";
163
+ readonly False: "false";
164
+ };
165
+ export type ListThreadsIsOpenEnum = typeof ListThreadsIsOpenEnum[keyof typeof ListThreadsIsOpenEnum];
@@ -0,0 +1,151 @@
1
+ /**
2
+ * API EN
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { StateHistoryResponse, UnitHistoryItem, UnitLoadResponse, UploadAssetResponse } from '../models/index';
14
+ export interface UnitsApiDeleteUnitStateRequest {
15
+ unitId: string;
16
+ key: string;
17
+ }
18
+ export interface UnitsApiDownloadAssetRequest {
19
+ unitId: string;
20
+ assetId: string;
21
+ contentType?: DownloadAssetContentTypeEnum;
22
+ }
23
+ export interface UnitsApiGetUnitHistoryRequest {
24
+ unitId: string;
25
+ start?: string;
26
+ end?: string;
27
+ ratio?: number;
28
+ }
29
+ export interface UnitsApiGetUnitStateHistoryRequest {
30
+ unitId: string;
31
+ keys: string;
32
+ start?: string;
33
+ end?: string;
34
+ offset?: number;
35
+ limit?: number;
36
+ }
37
+ export interface UnitsApiGetUnitStatesRequest {
38
+ unitId: string;
39
+ }
40
+ export interface UnitsApiLoadUnitDataRequest {
41
+ unitId: string;
42
+ start?: string;
43
+ end?: string;
44
+ ratio?: number;
45
+ }
46
+ export interface UnitsApiUpdateUnitStatesRequest {
47
+ unitId: string;
48
+ requestBody: {
49
+ [key: string]: string;
50
+ };
51
+ }
52
+ export interface UnitsApiUploadAssetRequest {
53
+ unitId: string;
54
+ file?: Blob;
55
+ }
56
+ /**
57
+ *
58
+ */
59
+ export declare class UnitsApi extends runtime.BaseAPI {
60
+ /**
61
+ * Permanently removes a specific state and its history for a unit **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:delete` permission is required
62
+ * Delete a unit state by key
63
+ */
64
+ deleteUnitStateRaw(requestParameters: UnitsApiDeleteUnitStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
65
+ /**
66
+ * Permanently removes a specific state and its history for a unit **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:delete` permission is required
67
+ * Delete a unit state by key
68
+ */
69
+ deleteUnitState(requestParameters: UnitsApiDeleteUnitStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
70
+ /**
71
+ * Downloads a file asset from S3 storage. Optional contentType query parameter to retrieve JSON content inline. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
72
+ * Download an asset file
73
+ */
74
+ downloadAssetRaw(requestParameters: UnitsApiDownloadAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
75
+ /**
76
+ * Downloads a file asset from S3 storage. Optional contentType query parameter to retrieve JSON content inline. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
77
+ * Download an asset file
78
+ */
79
+ downloadAsset(requestParameters: UnitsApiDownloadAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
80
+ /**
81
+ * Retrieves historical data for a specific unit within a specified time period with optional data sampling **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
82
+ * Get unit history data
83
+ */
84
+ getUnitHistoryRaw(requestParameters: UnitsApiGetUnitHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UnitHistoryItem>>>;
85
+ /**
86
+ * Retrieves historical data for a specific unit within a specified time period with optional data sampling **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
87
+ * Get unit history data
88
+ */
89
+ getUnitHistory(requestParameters: UnitsApiGetUnitHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UnitHistoryItem>>;
90
+ /**
91
+ * Retrieves historical state data for a specific unit. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required **Query Parameters** - `keys` is required (comma-separated or array) - `start` and `end` define the time range (ISO8601 format) - `offset` and `limit` control pagination
92
+ * Get unit state history
93
+ */
94
+ getUnitStateHistoryRaw(requestParameters: UnitsApiGetUnitStateHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StateHistoryResponse>>;
95
+ /**
96
+ * Retrieves historical state data for a specific unit. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required **Query Parameters** - `keys` is required (comma-separated or array) - `start` and `end` define the time range (ISO8601 format) - `offset` and `limit` control pagination
97
+ * Get unit state history
98
+ */
99
+ getUnitStateHistory(requestParameters: UnitsApiGetUnitStateHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StateHistoryResponse>;
100
+ /**
101
+ * Retrieves all state key-value pairs for a specific unit. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
102
+ * Get unit states
103
+ */
104
+ getUnitStatesRaw(requestParameters: UnitsApiGetUnitStatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
105
+ [key: string]: string;
106
+ }>>;
107
+ /**
108
+ * Retrieves all state key-value pairs for a specific unit. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
109
+ * Get unit states
110
+ */
111
+ getUnitStates(requestParameters: UnitsApiGetUnitStatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
112
+ [key: string]: string;
113
+ }>;
114
+ /**
115
+ * Retrieves historical data from Cassandra with double-parsed JSON data format and summary statistics (count, tail_date) **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
116
+ * Load unit data with parsed format
117
+ */
118
+ loadUnitDataRaw(requestParameters: UnitsApiLoadUnitDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnitLoadResponse>>;
119
+ /**
120
+ * Retrieves historical data from Cassandra with double-parsed JSON data format and summary statistics (count, tail_date) **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:read` permission is required
121
+ * Load unit data with parsed format
122
+ */
123
+ loadUnitData(requestParameters: UnitsApiLoadUnitDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnitLoadResponse>;
124
+ /**
125
+ * Inserts or updates state key-value pairs for a specific unit. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:write` permission is required **Note** - Multiple key-value pairs can be updated in a single request - Each state change is recorded with a timestamp in history
126
+ * Update unit states
127
+ */
128
+ updateUnitStatesRaw(requestParameters: UnitsApiUpdateUnitStatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
129
+ /**
130
+ * Inserts or updates state key-value pairs for a specific unit. **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:write` permission is required **Note** - Multiple key-value pairs can be updated in a single request - Each state change is recorded with a timestamp in history
131
+ * Update unit states
132
+ */
133
+ updateUnitStates(requestParameters: UnitsApiUpdateUnitStatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
134
+ /**
135
+ * Uploads a file asset to S3 storage for a specific unit. Supports two methods: 1. multipart/form-data: For file uploads 2. application/json: For direct JSON content with {filename, content} **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:write` permission is required
136
+ * Upload an asset file
137
+ */
138
+ uploadAssetRaw(requestParameters: UnitsApiUploadAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadAssetResponse>>;
139
+ /**
140
+ * Uploads a file asset to S3 storage for a specific unit. Supports two methods: 1. multipart/form-data: For file uploads 2. application/json: For direct JSON content with {filename, content} **Authorization** - API token is required in the `Authorization` header **Permissions** - `units:write` permission is required
141
+ * Upload an asset file
142
+ */
143
+ uploadAsset(requestParameters: UnitsApiUploadAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadAssetResponse>;
144
+ }
145
+ /**
146
+ * @export
147
+ */
148
+ export declare const DownloadAssetContentTypeEnum: {
149
+ readonly Json: "json";
150
+ };
151
+ export type DownloadAssetContentTypeEnum = typeof DownloadAssetContentTypeEnum[keyof typeof DownloadAssetContentTypeEnum];
@@ -0,0 +1,17 @@
1
+ export * from './AnalyticsApi';
2
+ export * from './ConnectionModelsApi';
3
+ export * from './ConnectionsApi';
4
+ export * from './ConvertersApi';
5
+ export * from './EventsApi';
6
+ export * from './GroupsApi';
7
+ export * from './InboundConnectionsApi';
8
+ export * from './InboundSourcesApi';
9
+ export * from './IntegrationsApi';
10
+ export * from './IntelligencesApi';
11
+ export * from './IssuesApi';
12
+ export * from './MachineApi';
13
+ export * from './MachinesApi';
14
+ export * from './NotificationsApi';
15
+ export * from './ReportsApi';
16
+ export * from './ThreadsApi';
17
+ export * from './UnitsApi';
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';