@stack-spot/portal-network 0.21.0 → 0.23.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 (42) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/api/notification.d.ts +158 -0
  3. package/dist/api/notification.d.ts.map +1 -0
  4. package/dist/api/notification.js +113 -0
  5. package/dist/api/notification.js.map +1 -0
  6. package/dist/api/workflows.d.ts +173 -1
  7. package/dist/api/workflows.d.ts.map +1 -1
  8. package/dist/api/workflows.js +62 -0
  9. package/dist/api/workflows.js.map +1 -1
  10. package/dist/api/workspace.d.ts +1 -1
  11. package/dist/api/workspace.d.ts.map +1 -1
  12. package/dist/apis.json +8 -0
  13. package/dist/client/content.d.ts +6 -6
  14. package/dist/client/content.d.ts.map +1 -1
  15. package/dist/client/content.js +4 -3
  16. package/dist/client/content.js.map +1 -1
  17. package/dist/client/notification.d.ts +36 -0
  18. package/dist/client/notification.d.ts.map +1 -0
  19. package/dist/client/notification.js +42 -0
  20. package/dist/client/notification.js.map +1 -0
  21. package/dist/client/workflow.d.ts +23 -8
  22. package/dist/client/workflow.d.ts.map +1 -1
  23. package/dist/client/workflow.js +24 -5
  24. package/dist/client/workflow.js.map +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/utils/remove-authorization-param.d.ts +5 -0
  30. package/dist/utils/remove-authorization-param.d.ts.map +1 -0
  31. package/dist/utils/remove-authorization-param.js +4 -0
  32. package/dist/utils/remove-authorization-param.js.map +1 -0
  33. package/package.json +1 -1
  34. package/src/api/notification.ts +278 -0
  35. package/src/api/workflows.ts +315 -1
  36. package/src/api/workspace.ts +1 -1
  37. package/src/apis.json +8 -0
  38. package/src/client/content.ts +4 -3
  39. package/src/client/notification.ts +32 -0
  40. package/src/client/workflow.ts +16 -5
  41. package/src/index.ts +1 -0
  42. package/src/utils/remove-authorization-param.ts +5 -0
@@ -7,12 +7,12 @@ declare class WorkflowClient extends ReactQueryNetworkClient {
7
7
  /**
8
8
  * Runs an action
9
9
  */
10
- runAction: import("../network/types.js").MutationObject<{
10
+ runAction: import("../network/types.js").MutationObject<Omit<{
11
11
  authorization: string;
12
12
  stackspotCustomerIp?: string | undefined;
13
13
  xExecutionId?: string | null | undefined;
14
14
  runActionRequest: import("../api/workflows.js").RunActionRequest;
15
- }, import("../api/workflows.js").WorkflowResponse>;
15
+ }, "authorization"> & {}, import("../api/workflows.js").WorkflowResponse>;
16
16
  /**
17
17
  * Creates an api
18
18
  */
@@ -25,26 +25,41 @@ declare class WorkflowClient extends ReactQueryNetworkClient {
25
25
  /**
26
26
  * Gets the execution status of a workflow by id
27
27
  */
28
- executionStatus: import("../network/types.js").QueryObject<{
28
+ executionStatus: import("../network/types.js").QueryObject<Omit<{
29
29
  executionId: string;
30
30
  authorization: string;
31
- }, import("../api/workflows.js").ExecutionResponse>;
31
+ }, "authorization"> & {}, import("../api/workflows.js").ExecutionResponse>;
32
32
  /**
33
33
  * Gets the execution dispatch service
34
34
  */
35
- executionDispatchInfo: import("../network/types.js").QueryObject<{
35
+ executionDispatchInfo: import("../network/types.js").QueryObject<Omit<{
36
36
  executionId: string;
37
37
  authorization: string;
38
- }, any>;
38
+ }, "authorization"> & {}, any>;
39
39
  /**
40
40
  * Gets the health check of an execution id
41
41
  */
42
- executionHealthCheck: import("../network/types.js").MutationObject<{
42
+ executionHealthCheck: import("../network/types.js").MutationObject<Omit<{
43
43
  authorization: string;
44
44
  stackspotCustomerIp?: string | undefined;
45
45
  xExecutionId?: string | null | undefined;
46
46
  body?: import("../api/workflows.js").HealthCheckRequest | null | undefined;
47
- }, import("../api/workflows.js").WorkflowResponse>;
47
+ }, "authorization"> & {}, import("../api/workflows.js").WorkflowResponse>;
48
+ /**
49
+ * Get data about the workflow plus a graph representation of its jobs.
50
+ */
51
+ graph: import("../network/types.js").QueryObject<Omit<{
52
+ executionId: string;
53
+ authorization: string;
54
+ }, "authorization"> & {}, import("../api/workflows.js").GetWorkflowExecutionJobGraphResponse>;
55
+ /**
56
+ * Gets the steps of a workflow job.
57
+ */
58
+ jobSteps: import("../network/types.js").QueryObject<Omit<{
59
+ executionId: string;
60
+ jobId: string;
61
+ authorization: string;
62
+ }, "authorization"> & {}, import("../api/workflows.js").WorkflowJobDetailResponse>;
48
63
  }
49
64
  export declare const workflowClient: WorkflowClient;
50
65
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/client/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAK7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,cAAM,cAAe,SAAQ,uBAAuB;;IAKlD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE;;OAEG;IACH,SAAS;;;;;oDAAgE;IAEzE;;OAEG;IACH,SAAS;;;;;oDAAgE;IAEzE;;OAEG;IACH,eAAe;;;qDAA8E;IAE7F;;OAEG;IACH,qBAAqB;;;YAA+E;IAEpG;;OAEG;IACH,oBAAoB;;;;;oDAAoE;CACzF;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAA"}
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/client/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAK7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,cAAM,cAAe,SAAQ,uBAAuB;;IAKlD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE;;OAEG;IACH,SAAS;;;;;2EAA0F;IAEnG;;OAEG;IACH,SAAS;;;;;oDAAgE;IAEzE;;OAEG;IACH,eAAe;;;4EAAwG;IAEvH;;OAEG;IACH,qBAAqB;;;mCAAyG;IAE9H;;OAEG;IACH,oBAAoB;;;;;2EAA8F;IAElH;;OAEG;IACH,KAAK;;;+FAAwG;IAE7G;;OAEG;IACH,QAAQ;;;;oFAAkH;CAC3H;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAA"}
@@ -1,8 +1,9 @@
1
- import { createApiServiceWorkflowsCreateApiDispatchPost, defaults, getExecutionDispatchRequestServiceWorkflowsExecutionIdRequestGet, getExecutionStatusServiceWorkflowsExecutionStatusExecutionIdGet, healthCheckServiceWorkflowsHealthCheckDispatchPost, runActionServiceWorkflowsRunActionDispatchPost } from '../api/workflows.js';
1
+ import { createApiServiceWorkflowsCreateApiDispatchPost, defaults, getExecutionDispatchRequestServiceWorkflowsExecutionIdRequestGet, getExecutionStatusServiceWorkflowsExecutionStatusExecutionIdGet, healthCheckServiceWorkflowsHealthCheckDispatchPost, runActionServiceWorkflowsRunActionDispatchPost, v1GetWorkflowExecutionJobDetailServiceV1ExecutionsExecutionIdJobsJobIdGet, v1GetWorkflowExecutionJobGraphServiceV1ExecutionsExecutionIdGet } from '../api/workflows.js';
2
2
  import apis from '../apis.json';
3
3
  import { DefaultAPIError } from '../error/DefaultAPIError.js';
4
4
  import { actionDictionary } from '../error/dictionary/action.js';
5
5
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
6
+ import { removeAuthorizationParam } from '../utils/remove-authorization-param.js';
6
7
  class WorkflowClient extends ReactQueryNetworkClient {
7
8
  constructor() {
8
9
  super(apis.workflows.url, defaults);
@@ -13,7 +14,7 @@ class WorkflowClient extends ReactQueryNetworkClient {
13
14
  enumerable: true,
14
15
  configurable: true,
15
16
  writable: true,
16
- value: this.mutation(runActionServiceWorkflowsRunActionDispatchPost)
17
+ value: this.mutation(removeAuthorizationParam(runActionServiceWorkflowsRunActionDispatchPost))
17
18
  });
18
19
  /**
19
20
  * Creates an api
@@ -31,7 +32,7 @@ class WorkflowClient extends ReactQueryNetworkClient {
31
32
  enumerable: true,
32
33
  configurable: true,
33
34
  writable: true,
34
- value: this.query(getExecutionStatusServiceWorkflowsExecutionStatusExecutionIdGet)
35
+ value: this.query(removeAuthorizationParam(getExecutionStatusServiceWorkflowsExecutionStatusExecutionIdGet))
35
36
  });
36
37
  /**
37
38
  * Gets the execution dispatch service
@@ -40,7 +41,7 @@ class WorkflowClient extends ReactQueryNetworkClient {
40
41
  enumerable: true,
41
42
  configurable: true,
42
43
  writable: true,
43
- value: this.query(getExecutionDispatchRequestServiceWorkflowsExecutionIdRequestGet)
44
+ value: this.query(removeAuthorizationParam(getExecutionDispatchRequestServiceWorkflowsExecutionIdRequestGet))
44
45
  });
45
46
  /**
46
47
  * Gets the health check of an execution id
@@ -49,7 +50,25 @@ class WorkflowClient extends ReactQueryNetworkClient {
49
50
  enumerable: true,
50
51
  configurable: true,
51
52
  writable: true,
52
- value: this.mutation(healthCheckServiceWorkflowsHealthCheckDispatchPost)
53
+ value: this.mutation(removeAuthorizationParam(healthCheckServiceWorkflowsHealthCheckDispatchPost))
54
+ });
55
+ /**
56
+ * Get data about the workflow plus a graph representation of its jobs.
57
+ */
58
+ Object.defineProperty(this, "graph", {
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true,
62
+ value: this.query(removeAuthorizationParam(v1GetWorkflowExecutionJobGraphServiceV1ExecutionsExecutionIdGet))
63
+ });
64
+ /**
65
+ * Gets the steps of a workflow job.
66
+ */
67
+ Object.defineProperty(this, "jobSteps", {
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true,
71
+ value: this.query(removeAuthorizationParam(v1GetWorkflowExecutionJobDetailServiceV1ExecutionsExecutionIdJobsJobIdGet))
53
72
  });
54
73
  }
55
74
  buildStackSpotError(error) {
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../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CAAC,OAAO,CAAC,CAAA;IACvF,CAAC;CAoCF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { runtimeManagerClient } from './client/runtime-manager.js';
7
7
  export { workspaceSearchClient } from './client/workspace-search.js';
8
8
  export { workflowClient } from './client/workflow.js';
9
9
  export { eventBusClient } from './client/event-bus.js';
10
+ export { notificationClient } from './client/notification.js';
10
11
  export * from './client/types.js';
11
12
  export { UseQueryObjectOptions } from './network/types.js';
12
13
  export { DefaultAPIError } from './error/DefaultAPIError.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ export { runtimeManagerClient } from './client/runtime-manager.js';
7
7
  export { workspaceSearchClient } from './client/workspace-search.js';
8
8
  export { workflowClient } from './client/workflow.js';
9
9
  export { eventBusClient } from './client/event-bus.js';
10
+ export { notificationClient } from './client/notification.js';
10
11
  export * from './client/types.js';
11
12
  export { DefaultAPIError } from './error/DefaultAPIError.js';
12
13
  export { StackspotAPIError } from './error/StackspotAPIError.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,cAAc,gBAAgB,CAAA;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,cAAc,gBAAgB,CAAA;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { FixVariables, OazapftsFunction } from '../client/types.js';
2
+ export declare function removeAuthorizationParam<T extends OazapftsFunction>(fn: T): FixVariables<T, {
3
+ authorization: never;
4
+ }>;
5
+ //# sourceMappingURL=remove-authorization-param.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-authorization-param.d.ts","sourceRoot":"","sources":["../../src/utils/remove-authorization-param.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEhE,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,EAAE,EAAE,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE;IAAE,aAAa,EAAE,KAAK,CAAA;CAAE,CAAC,CAErH"}
@@ -0,0 +1,4 @@
1
+ export function removeAuthorizationParam(fn) {
2
+ return fn;
3
+ }
4
+ //# sourceMappingURL=remove-authorization-param.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-authorization-param.js","sourceRoot":"","sources":["../../src/utils/remove-authorization-param.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAA6B,EAAK;IACxE,OAAO,EAAE,CAAA;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-network",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,278 @@
1
+ /**
2
+ * Notification Engine
3
+ * 1.0.0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "https://account-notification-engine.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://account-notification-engine.dev.stackspot.com"
16
+ };
17
+ export type GetTenantNotificationsResponse = {
18
+ id: string;
19
+ title: string;
20
+ description: string;
21
+ broadcast_level: "ACCOUNT" | "INDIVIDUAL" | "PLATFORM" | "RESOURCE";
22
+ context: "ACCOUNT" | "STUDIO" | "WORKSPACE" | "AI";
23
+ target?: string;
24
+ criticality: "LOW" | "MEDIUM" | "HIGH";
25
+ call_to_action: string;
26
+ persistent: boolean;
27
+ committed: boolean;
28
+ last_until?: string;
29
+ trigger_at: string;
30
+ created_at?: string;
31
+ };
32
+ export type PagingResponseModelGetTenantNotificationsResponse = {
33
+ items: GetTenantNotificationsResponse[];
34
+ size: number;
35
+ total_elements: number;
36
+ };
37
+ export type ErrorDetails = {
38
+ code: "INTEGRATION_EXCEPTION" | "INVALID_TENANT" | "VALIDATION_ERROR" | "MANDATORY_FIELD_NOT_INFORMED" | "INVALID_REQUEST" | "NOTIFICATION_NOT_FOUND" | "INVALID_FIELD" | "MISSING_TOKEN";
39
+ field?: string;
40
+ details?: string;
41
+ values?: string[];
42
+ };
43
+ export type ApiErrorResponse = {
44
+ code?: "INTEGRATION_EXCEPTION" | "INVALID_TENANT" | "VALIDATION_ERROR" | "MANDATORY_FIELD_NOT_INFORMED" | "INVALID_REQUEST" | "NOTIFICATION_NOT_FOUND" | "INVALID_FIELD" | "MISSING_TOKEN";
45
+ status: number;
46
+ message: string;
47
+ details?: ErrorDetails[];
48
+ };
49
+ export type CreateTenantNotificationRequest = {
50
+ /** User friendly title for the notification */
51
+ title: string;
52
+ /** User friendly description for the notification (allows the use of markdown) */
53
+ description: string;
54
+ /** Level of broadcasting to the notification. */
55
+ broadcast_level: "ACCOUNT" | "INDIVIDUAL" | "PLATFORM" | "RESOURCE" | "ACCOUNT" | "INDIVIDUAL" | "RESOURCE";
56
+ /** The target of the notification, user id for 'individual', resource id for 'resource', leave empty for any other */
57
+ target: string;
58
+ /** Criticality of the notification. */
59
+ criticality: "LOW" | "MEDIUM" | "HIGH" | "LOW" | "MEDIUM" | "HIGH";
60
+ /** Which context to publish the notification */
61
+ context: "ACCOUNT" | "STUDIO" | "WORKSPACE" | "AI" | "Account" | "Studio" | "Workspace";
62
+ /** Possible redirect link for the notification button. */
63
+ call_to_action: string;
64
+ /** If the notification should be re-consumed until 'last_until' is reached. */
65
+ persistent: boolean;
66
+ /** UTC formatted timestamp to when the notification should finally end, if the persistent is set to true. */
67
+ last_until?: string;
68
+ /** UTC formatted timestamp for when to triggers the notification. */
69
+ trigger_at: string;
70
+ };
71
+ export type CreatePlatformNotificationRequest = {
72
+ /** User friendly title for the notification */
73
+ title: string;
74
+ /** User friendly description for the notification (allows the use of markdown) */
75
+ description: string;
76
+ /** Criticality of the notification. */
77
+ criticality: "LOW" | "MEDIUM" | "HIGH" | "LOW" | "MEDIUM" | "HIGH";
78
+ /** Which context to publish the notification */
79
+ context: "ACCOUNT" | "STUDIO" | "WORKSPACE" | "AI" | "Account" | "Studio" | "Workspace";
80
+ /** Possible redirect link for the notification button. */
81
+ call_to_action: string;
82
+ /** If the notification should be re-consumed until last_until is reached. */
83
+ persistent: boolean;
84
+ /** UTC formatted timestamp to when the notification should finally ended if the persistent is set to true. */
85
+ last_until?: string;
86
+ /** UTC formatted timestamp for when to triggers the notification. */
87
+ trigger_at: string;
88
+ };
89
+ export type CreatePlatformNotificationResponse = {
90
+ id: string;
91
+ };
92
+ export type GetCommittedNotificationsResponse = {
93
+ /** If there are uncommitted notifications for the user */
94
+ uncommitted_messages: boolean;
95
+ };
96
+ /**
97
+ * Get notifications for tenant
98
+ */
99
+ export function findAll({ size, page, createdSince, context, criticality, content, committed, tenantId }: {
100
+ size?: number;
101
+ page?: number;
102
+ createdSince?: number;
103
+ context?: "ACCOUNT" | "STUDIO" | "WORKSPACE" | "AI";
104
+ criticality?: "LOW" | "MEDIUM" | "HIGH";
105
+ content?: string;
106
+ committed?: boolean;
107
+ tenantId: string;
108
+ }, opts?: Oazapfts.RequestOpts) {
109
+ return oazapfts.ok(oazapfts.fetchJson<{
110
+ status: 200;
111
+ data: PagingResponseModelGetTenantNotificationsResponse;
112
+ } | {
113
+ status: 403;
114
+ data: ApiErrorResponse;
115
+ } | {
116
+ status: 500;
117
+ data: ApiErrorResponse;
118
+ }>(`/v1/tenants/${encodeURIComponent(tenantId)}/notifications${QS.query(QS.explode({
119
+ size,
120
+ page,
121
+ createdSince,
122
+ context,
123
+ criticality,
124
+ content,
125
+ committed
126
+ }))}`, {
127
+ ...opts
128
+ }));
129
+ }
130
+ /**
131
+ * Generate a new notification intent to the specified tenant
132
+ */
133
+ export function create({ tenantId, createTenantNotificationRequest }: {
134
+ tenantId: string;
135
+ createTenantNotificationRequest: CreateTenantNotificationRequest;
136
+ }, opts?: Oazapfts.RequestOpts) {
137
+ return oazapfts.ok(oazapfts.fetchJson<{
138
+ status: 201;
139
+ data: object;
140
+ } | {
141
+ status: 403;
142
+ data: ApiErrorResponse;
143
+ } | {
144
+ status: 500;
145
+ data: ApiErrorResponse;
146
+ }>(`/v1/tenants/${encodeURIComponent(tenantId)}/notifications`, oazapfts.json({
147
+ ...opts,
148
+ method: "POST",
149
+ body: createTenantNotificationRequest
150
+ })));
151
+ }
152
+ /**
153
+ * Allows to mark a notification as committed
154
+ */
155
+ export function commit({ notificationId, tenantId }: {
156
+ notificationId: string;
157
+ tenantId: string;
158
+ }, opts?: Oazapfts.RequestOpts) {
159
+ return oazapfts.ok(oazapfts.fetchJson<{
160
+ status: 204;
161
+ } | {
162
+ status: 403;
163
+ data: ApiErrorResponse;
164
+ } | {
165
+ status: 500;
166
+ data: ApiErrorResponse;
167
+ }>(`/v1/tenants/${encodeURIComponent(tenantId)}/notifications/${encodeURIComponent(notificationId)}/commit`, {
168
+ ...opts,
169
+ method: "POST"
170
+ }));
171
+ }
172
+ /**
173
+ * Generate a new notification intent to the specified tenant
174
+ */
175
+ export function create1({ createPlatformNotificationRequest }: {
176
+ createPlatformNotificationRequest: CreatePlatformNotificationRequest;
177
+ }, opts?: Oazapfts.RequestOpts) {
178
+ return oazapfts.ok(oazapfts.fetchJson<{
179
+ status: 200;
180
+ data: CreatePlatformNotificationResponse;
181
+ }>("/v1/notifications", oazapfts.json({
182
+ ...opts,
183
+ method: "POST",
184
+ body: createPlatformNotificationRequest
185
+ })));
186
+ }
187
+ /**
188
+ * Allows to check if there are any uncommitted notifications for the user
189
+ */
190
+ export function committedNotifications({ tenantId }: {
191
+ tenantId: string;
192
+ }, opts?: Oazapfts.RequestOpts) {
193
+ return oazapfts.ok(oazapfts.fetchJson<{
194
+ status: 200;
195
+ data: GetCommittedNotificationsResponse;
196
+ } | {
197
+ status: 403;
198
+ data: ApiErrorResponse;
199
+ } | {
200
+ status: 500;
201
+ data: ApiErrorResponse;
202
+ }>(`/v1/tenants/${encodeURIComponent(tenantId)}/notifications/committed`, {
203
+ ...opts
204
+ }));
205
+ }
206
+ /**
207
+ * Actuator web endpoint 'health'
208
+ */
209
+ export function health(opts?: Oazapfts.RequestOpts) {
210
+ return oazapfts.ok(oazapfts.fetchJson<{
211
+ status: 200;
212
+ data: object;
213
+ }>("/healthz", {
214
+ ...opts
215
+ }));
216
+ }
217
+ /**
218
+ * Actuator web endpoint 'health-path'
219
+ */
220
+ export function getHealthz(opts?: Oazapfts.RequestOpts) {
221
+ return oazapfts.ok(oazapfts.fetchJson<{
222
+ status: 200;
223
+ data: object;
224
+ }>("/healthz/**", {
225
+ ...opts
226
+ }));
227
+ }
228
+ /**
229
+ * Delete notification by id
230
+ */
231
+ export function deleteV1TenantsByTenantIdNotificationsAndNotificationId({ notificationId, tenantId }: {
232
+ notificationId: string;
233
+ tenantId: string;
234
+ }, opts?: Oazapfts.RequestOpts) {
235
+ return oazapfts.ok(oazapfts.fetchJson<{
236
+ status: 204;
237
+ } | {
238
+ status: 403;
239
+ data: ApiErrorResponse;
240
+ } | {
241
+ status: 500;
242
+ data: ApiErrorResponse;
243
+ }>(`/v1/tenants/${encodeURIComponent(tenantId)}/notifications/${encodeURIComponent(notificationId)}`, {
244
+ ...opts,
245
+ method: "DELETE"
246
+ }));
247
+ }
248
+ /**
249
+ * Allows to unmark a notification as committed
250
+ */
251
+ export function uncommit({ notificationId, tenantId }: {
252
+ notificationId: string;
253
+ tenantId: string;
254
+ }, opts?: Oazapfts.RequestOpts) {
255
+ return oazapfts.ok(oazapfts.fetchJson<{
256
+ status: 204;
257
+ } | {
258
+ status: 403;
259
+ data: ApiErrorResponse;
260
+ } | {
261
+ status: 500;
262
+ data: ApiErrorResponse;
263
+ }>(`/v1/tenants/${encodeURIComponent(tenantId)}/notifications/${encodeURIComponent(notificationId)}/uncommit`, {
264
+ ...opts,
265
+ method: "DELETE"
266
+ }));
267
+ }
268
+ /**
269
+ * Batches deletes the notification in all tenants
270
+ */
271
+ export function delete1({ notificationId }: {
272
+ notificationId: string;
273
+ }, opts?: Oazapfts.RequestOpts) {
274
+ return oazapfts.ok(oazapfts.fetchText(`/v1/notifications/${encodeURIComponent(notificationId)}`, {
275
+ ...opts,
276
+ method: "DELETE"
277
+ }));
278
+ }