anbaric-impl-cloud 1.25.0 → 1.26.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.
@@ -0,0 +1,8 @@
1
+ import { Job, Notifier, WaitForInput } from "anbaric-tsapi";
2
+ declare class CloudNotifier implements Notifier {
3
+ private client;
4
+ constructor(baseUrl?: string);
5
+ notify(targets: Array<string>, job: Job, waitingFor: WaitForInput): Promise<void>;
6
+ }
7
+ export { CloudNotifier };
8
+ //# sourceMappingURL=CloudNotifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudNotifier.d.ts","sourceRoot":"","sources":["../src/CloudNotifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAsC,MAAM,eAAe,CAAC;AAO/F,cAAM,aAAc,YAAW,QAAQ;IAEnC,OAAO,CAAC,MAAM,CAAkB;IAEhC,YAAY,OAAO,GAAG,MAAwC,EAE7D;IAEK,MAAM,CAAC,OAAO,EAAG,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAG,GAAG,EAAE,UAAU,EAAG,YAAY,GAAI,OAAO,CAAC,IAAI,CAAC,CAM1F;CAEJ;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { serializeJob, serializeWaitForInput } from "anbaric-tsapi";
2
+ import { CloudApiClient } from "./CloudApiClient.js";
3
+ /* The app-side notifier. It carries no idea of how anyone is reached - it hands
4
+ the targets and the parked job to the platform, which owns the delivery
5
+ (email, in the hosted case). This is why an app never references a concrete
6
+ notifier: it posts, exactly as CloudQueue and CloudJobPersistence do. */
7
+ class CloudNotifier {
8
+ client;
9
+ constructor(baseUrl = CloudApiClient.defaultBaseUrl()) {
10
+ this.client = new CloudApiClient(baseUrl);
11
+ }
12
+ async notify(targets, job, waitingFor) {
13
+ await this.client.request("POST", "/notifications", {
14
+ targets,
15
+ job: serializeJob(job),
16
+ waitingFor: serializeWaitForInput(waitingFor),
17
+ });
18
+ }
19
+ }
20
+ export { CloudNotifier };
21
+ //# sourceMappingURL=CloudNotifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudNotifier.js","sourceRoot":"","sources":["../src/CloudNotifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,EAAE,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD;;;2EAG2E;AAC3E,MAAM,aAAa;IAEP,MAAM,CAAkB;IAEhC,YAAY,OAAO,GAAY,cAAc,CAAC,cAAc,EAAE;QAC1D,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAuB,EAAE,GAAS,EAAE,UAAyB;QACtE,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,gBAAgB,EAAE;YAChD,OAAO;YACP,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC;YACtB,UAAU,EAAE,qBAAqB,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACP,CAAC;CAEJ;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from "./CloudJsonStore.js";
4
4
  export * from "./CloudSecretStore.js";
5
5
  export * from "./CloudQueue.js";
6
6
  export * from "./CloudJobRunSchedulePersistence.js";
7
+ export * from "./CloudNotifier.js";
7
8
  export * from "./CloudAuditor.js";
8
9
  export * from "./CloudSessionResolver.js";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export * from "./CloudJsonStore.js";
4
4
  export * from "./CloudSecretStore.js";
5
5
  export * from "./CloudQueue.js";
6
6
  export * from "./CloudJobRunSchedulePersistence.js";
7
+ export * from "./CloudNotifier.js";
7
8
  export * from "./CloudAuditor.js";
8
9
  export * from "./CloudSessionResolver.js";
9
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anbaric-impl-cloud",
3
- "version": "1.25.0",
3
+ "version": "1.26.0",
4
4
  "description": "Public client library for the Anbaric Cloud hosting API, providing JobPersistence and Queue implementations backed by the cloud service",
5
5
  "license": "MIT",
6
6
  "author": "chris@anbaric.ai",
@@ -20,7 +20,7 @@
20
20
  "prepublishOnly": "npm run build"
21
21
  },
22
22
  "dependencies": {
23
- "anbaric-tsapi": "^1.25.0"
23
+ "anbaric-tsapi": "^1.26.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^26.2.0",