@productcraft/notify 0.2.0 → 0.3.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.
package/manifest.json CHANGED
@@ -1,5 +1,50 @@
1
1
  {
2
2
  "operations": {
3
+ "BatchesController_flush": {
4
+ "actor": null,
5
+ "deprecated": false,
6
+ "http": "POST /v1/workspaces/{workspace_id}/batches/{batch_id}/flush",
7
+ "idempotent": true,
8
+ "method": "flush",
9
+ "paginated": false,
10
+ "params": null,
11
+ "poll": null,
12
+ "public": false,
13
+ "resource": "batches",
14
+ "scope": null,
15
+ "signature": "notify.batches.flush(batchId, options?): Notify.FlushBatch",
16
+ "snippet": "const flushBatch = await notify.batches.flush(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");"
17
+ },
18
+ "BatchesController_list": {
19
+ "actor": null,
20
+ "deprecated": false,
21
+ "http": "GET /v1/workspaces/{workspace_id}/batches",
22
+ "idempotent": false,
23
+ "method": "list",
24
+ "paginated": true,
25
+ "params": "Notify.BatchListParams",
26
+ "poll": null,
27
+ "public": false,
28
+ "resource": "batches",
29
+ "scope": null,
30
+ "signature": "notify.batches.list(params?, options?): PagePromise<Notify.BatchSummary>",
31
+ "snippet": "for await (const batch of notify.batches.list()) {\n console.log(batch);\n}\nconst page = await notify.batches.list({}, { timeout: 5_000 });"
32
+ },
33
+ "BatchesController_retrieve": {
34
+ "actor": null,
35
+ "deprecated": false,
36
+ "http": "GET /v1/workspaces/{workspace_id}/batches/{batch_id}",
37
+ "idempotent": false,
38
+ "method": "retrieve",
39
+ "paginated": false,
40
+ "params": null,
41
+ "poll": null,
42
+ "public": false,
43
+ "resource": "batches",
44
+ "scope": null,
45
+ "signature": "notify.batches.retrieve(batchId, options?): Notify.BatchDetail",
46
+ "snippet": "const batchDetail = await notify.batches.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");"
47
+ },
3
48
  "CategoriesController_create": {
4
49
  "actor": null,
5
50
  "deprecated": false,
@@ -510,6 +555,21 @@
510
555
  "signature": "notify.notifications.send(params, options?): Notify.NotificationSendResponse",
511
556
  "snippet": "const result = await notify.notifications.send({\n recipients: [\"user_123\", { email: \"a@example.com\", external_id: \"user_456\", locale: \"pt-PT\" }],\n type: \"invoice.paid\",\n});"
512
557
  },
558
+ "PreferenceLinkController_create": {
559
+ "actor": null,
560
+ "deprecated": false,
561
+ "http": "POST /v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link",
562
+ "idempotent": false,
563
+ "method": "createPreferenceLink",
564
+ "paginated": false,
565
+ "params": "Notify.RecipientCreatePreferenceLinkParams",
566
+ "poll": null,
567
+ "public": false,
568
+ "resource": "recipients",
569
+ "scope": null,
570
+ "signature": "notify.recipients.createPreferenceLink(externalId, params?, options?): Notify.PreferenceLink",
571
+ "snippet": "const preferenceLink = await notify.recipients.createPreferenceLink(\"user_123\", { category_key: \"product-updates\" });"
572
+ },
513
573
  "PreferencesController_replace": {
514
574
  "actor": null,
515
575
  "deprecated": false,
@@ -748,7 +808,7 @@
748
808
  "resource": "settings",
749
809
  "scope": null,
750
810
  "signature": "notify.settings.update(params?, options?): Notify.NotifySettings",
751
- "snippet": "const notifySettings = await notify.settings.update({ client_origins: [\"https://app.example.com\", \"https://www.example.com\"] });"
811
+ "snippet": "const notifySettings = await notify.settings.update({\n branding: {\n accent_color: \"#4f46e5\",\n logo_url: \"https://acme.example/logo.png\",\n name: \"Acme\",\n privacy_url: \"https://acme.example/privacy\",\n },\n});"
752
812
  },
753
813
  "SetupStatusController_get": {
754
814
  "actor": null,
@@ -943,7 +1003,7 @@
943
1003
  "resource": "notificationTypes",
944
1004
  "scope": null,
945
1005
  "signature": "notify.notificationTypes.update(typeId, params?, options?): Notify.NotificationType",
946
- "snippet": "const notificationType = await notify.notificationTypes.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { category_key: \"billing\" });"
1006
+ "snippet": "const notificationType = await notify.notificationTypes.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n batch: {\n inbox: \"collapse\",\n key: \"post_id\",\n max_items: 10,\n max_window_seconds: 3600,\n mode: \"window\",\n schedule: { frequency: \"daily\", time: \"09:00\", weekday: \"monday\" },\n sliding: false,\n window_seconds: 300,\n },\n});"
947
1007
  },
948
1008
  "TypesController_versions": {
949
1009
  "actor": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productcraft/notify",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Node.js / TypeScript client for ProductCraft Notify: one call notifies a user across an in-app inbox, email, web push, APNs and FCM, with preferences, fallbacks, quiet hours, templates, delivery history and signed webhooks. Includes the browser-safe recipient-token client scope.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",