@ossy/types 0.0.6 → 0.0.7

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/build/Jobs.js ADDED
@@ -0,0 +1 @@
1
+ const s={VisualContentDescriptors:"@ossy/jobs/visual-content-descriptors",ResizeCommonWeb:"@ossy/jobs/resize-common-web"},e={Queued:"queued",InProgress:"in progress",Success:"success",Failed:"failed"};export{e as JobStatus,s as Jobs};
package/build/index.d.ts CHANGED
@@ -24,7 +24,6 @@ interface ResourceTemplate {
24
24
  id: string;
25
25
  name: string;
26
26
  description: string;
27
- categoryName: string;
28
27
  icon: string;
29
28
  fields: Field[];
30
29
  }
@@ -40,4 +39,37 @@ interface Workspace {
40
39
  services: Record<string, boolean>;
41
40
  }
42
41
 
43
- export type { Field, Resource, ResourceTemplate, Workspace };
42
+ interface SDKConfig {
43
+ apiUrl?: string;
44
+ workspaceId?: string;
45
+ authorization?: string;
46
+ }
47
+
48
+ interface Action<Payload extends (Record<string, string | boolean | number> & SDKConfig) | undefined = {}> {
49
+ id: string;
50
+ endpoint: string;
51
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
52
+ payload?: Payload;
53
+ }
54
+
55
+ declare const Jobs: {
56
+ readonly VisualContentDescriptors: "@ossy/jobs/visual-content-descriptors";
57
+ readonly ResizeCommonWeb: "@ossy/jobs/resize-common-web";
58
+ };
59
+ type JobType = typeof Jobs[keyof typeof Jobs];
60
+ declare const JobStatus: {
61
+ readonly Queued: "queued";
62
+ readonly InProgress: "in progress";
63
+ readonly Success: "success";
64
+ readonly Failed: "failed";
65
+ };
66
+ type JobStatusType = typeof JobStatus[keyof typeof JobStatus];
67
+ interface Job {
68
+ resourceId: string;
69
+ status: JobStatusType;
70
+ result?: unknown;
71
+ nextReevaluation?: number | null;
72
+ }
73
+
74
+ export { JobStatus, Jobs };
75
+ export type { Action, Field, Job, JobStatusType, JobType, Resource, ResourceTemplate, SDKConfig, Workspace };
package/build/index.js CHANGED
@@ -1 +1 @@
1
-
1
+ export{JobStatus,Jobs}from"./Jobs.js";
@@ -0,0 +1,7 @@
1
+ import type { SDKConfig } from './SDKConfig';
2
+ export interface Action<Payload extends (Record<string, string | boolean | number> & SDKConfig) | undefined = {}> {
3
+ id: string;
4
+ endpoint: string;
5
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
6
+ payload?: Payload;
7
+ }
@@ -0,0 +1,18 @@
1
+ export declare const Jobs: {
2
+ readonly VisualContentDescriptors: "@ossy/jobs/visual-content-descriptors";
3
+ readonly ResizeCommonWeb: "@ossy/jobs/resize-common-web";
4
+ };
5
+ export type JobType = typeof Jobs[keyof typeof Jobs];
6
+ export declare const JobStatus: {
7
+ readonly Queued: "queued";
8
+ readonly InProgress: "in progress";
9
+ readonly Success: "success";
10
+ readonly Failed: "failed";
11
+ };
12
+ export type JobStatusType = typeof JobStatus[keyof typeof JobStatus];
13
+ export interface Job {
14
+ resourceId: string;
15
+ status: JobStatusType;
16
+ result?: unknown;
17
+ nextReevaluation?: number | null;
18
+ }
@@ -3,7 +3,6 @@ export interface ResourceTemplate {
3
3
  id: string;
4
4
  name: string;
5
5
  description: string;
6
- categoryName: string;
7
6
  icon: string;
8
7
  fields: Field[];
9
8
  }
@@ -0,0 +1,5 @@
1
+ export interface SDKConfig {
2
+ apiUrl?: string;
3
+ workspaceId?: string;
4
+ authorization?: string;
5
+ }
@@ -2,3 +2,7 @@ export type { Field } from './Field';
2
2
  export type { Resource } from './Resource';
3
3
  export type { ResourceTemplate } from './ResourceTemplate';
4
4
  export type { Workspace } from './Workspace';
5
+ export type { SDKConfig } from './SDKConfig';
6
+ export type { Action } from './Action';
7
+ export { Jobs, JobStatus } from './Jobs';
8
+ export type { JobType, JobStatusType, Job } from './Jobs';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/types",
3
3
  "description": "Shared TypeScript types for all packages",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "url": "git://github.com/ossy-se/packages/types",
6
6
  "source": "src/index.ts",
7
7
  "module": "build/index.js",
@@ -26,5 +26,5 @@
26
26
  "/build",
27
27
  "README.md"
28
28
  ],
29
- "gitHead": "9d1619ca70c0fa64a1b57b34f64ff062cd12c640"
29
+ "gitHead": "444b07347555d52448c3f206db9f492d434222d3"
30
30
  }