@productcraft/notify 0.3.0 → 0.4.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/README.md +8 -6
- package/api.md +199 -12
- package/dist/index.cjs +221 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1842 -160
- package/dist/index.d.ts +1842 -160
- package/dist/index.js +221 -16
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +132 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +132 -0
- package/dist/testing.js.map +1 -1
- package/manifest.json +106 -1
- package/package.json +1 -1
package/manifest.json
CHANGED
|
@@ -1,5 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"operations": {
|
|
3
|
+
"ApprovalsController_cancel": {
|
|
4
|
+
"actor": null,
|
|
5
|
+
"deprecated": false,
|
|
6
|
+
"http": "POST /v1/workspaces/{workspace_id}/approvals/{approval_id}/cancel",
|
|
7
|
+
"idempotent": false,
|
|
8
|
+
"method": "cancel",
|
|
9
|
+
"paginated": false,
|
|
10
|
+
"params": null,
|
|
11
|
+
"poll": null,
|
|
12
|
+
"public": false,
|
|
13
|
+
"resource": "approvals",
|
|
14
|
+
"scope": null,
|
|
15
|
+
"signature": "notify.approvals.cancel(approvalId, options?): Notify.Approval",
|
|
16
|
+
"snippet": "const approval = await notify.approvals.cancel(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");"
|
|
17
|
+
},
|
|
18
|
+
"ApprovalsController_create": {
|
|
19
|
+
"actor": null,
|
|
20
|
+
"deprecated": false,
|
|
21
|
+
"http": "POST /v1/workspaces/{workspace_id}/approvals",
|
|
22
|
+
"idempotent": true,
|
|
23
|
+
"method": "create",
|
|
24
|
+
"paginated": false,
|
|
25
|
+
"params": "Notify.ApprovalCreateParams",
|
|
26
|
+
"poll": null,
|
|
27
|
+
"public": false,
|
|
28
|
+
"resource": "approvals",
|
|
29
|
+
"scope": null,
|
|
30
|
+
"signature": "notify.approvals.create(params, options?): Notify.Approval",
|
|
31
|
+
"snippet": "const approval = await notify.approvals.create({\n approvers: [\"user_123\"],\n title: \"Deploy api v2.14 to production?\",\n type: \"deploy.approval\",\n});"
|
|
32
|
+
},
|
|
33
|
+
"ApprovalsController_list": {
|
|
34
|
+
"actor": null,
|
|
35
|
+
"deprecated": false,
|
|
36
|
+
"http": "GET /v1/workspaces/{workspace_id}/approvals",
|
|
37
|
+
"idempotent": false,
|
|
38
|
+
"method": "list",
|
|
39
|
+
"paginated": true,
|
|
40
|
+
"params": "Notify.ApprovalListParams",
|
|
41
|
+
"poll": null,
|
|
42
|
+
"public": false,
|
|
43
|
+
"resource": "approvals",
|
|
44
|
+
"scope": null,
|
|
45
|
+
"signature": "notify.approvals.list(params?, options?): PagePromise<Notify.Approval>",
|
|
46
|
+
"snippet": "for await (const approval of notify.approvals.list()) {\n console.log(approval);\n}\nconst page = await notify.approvals.list({}, { timeout: 5_000 });"
|
|
47
|
+
},
|
|
48
|
+
"ApprovalsController_recordDecision": {
|
|
49
|
+
"actor": null,
|
|
50
|
+
"deprecated": false,
|
|
51
|
+
"http": "POST /v1/workspaces/{workspace_id}/approvals/{approval_id}/decision",
|
|
52
|
+
"idempotent": false,
|
|
53
|
+
"method": "recordDecision",
|
|
54
|
+
"paginated": false,
|
|
55
|
+
"params": "Notify.ApprovalRecordDecisionParams",
|
|
56
|
+
"poll": null,
|
|
57
|
+
"public": false,
|
|
58
|
+
"resource": "approvals",
|
|
59
|
+
"scope": null,
|
|
60
|
+
"signature": "notify.approvals.recordDecision(approvalId, params, options?): Notify.Approval",
|
|
61
|
+
"snippet": "const approval = await notify.approvals.recordDecision(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { approver: \"user_123\", decision: \"approve\" });"
|
|
62
|
+
},
|
|
63
|
+
"ApprovalsController_retrieve": {
|
|
64
|
+
"actor": null,
|
|
65
|
+
"deprecated": false,
|
|
66
|
+
"http": "GET /v1/workspaces/{workspace_id}/approvals/{approval_id}",
|
|
67
|
+
"idempotent": false,
|
|
68
|
+
"method": "retrieve",
|
|
69
|
+
"paginated": false,
|
|
70
|
+
"params": "Notify.ApprovalRetrieveParams",
|
|
71
|
+
"poll": null,
|
|
72
|
+
"public": false,
|
|
73
|
+
"resource": "approvals",
|
|
74
|
+
"scope": null,
|
|
75
|
+
"signature": "notify.approvals.retrieve(approvalId, params?, options?): Notify.ApprovalDetail",
|
|
76
|
+
"snippet": "const approvalDetail = await notify.approvals.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");"
|
|
77
|
+
},
|
|
3
78
|
"BatchesController_flush": {
|
|
4
79
|
"actor": null,
|
|
5
80
|
"deprecated": false,
|
|
@@ -240,6 +315,36 @@
|
|
|
240
315
|
"signature": "notify.channels.webpush.retrieve(options?): Notify.WebPushChannel",
|
|
241
316
|
"snippet": "const webPushChannel = await notify.channels.webpush.retrieve();"
|
|
242
317
|
},
|
|
318
|
+
"ClientApprovalsController_decide": {
|
|
319
|
+
"actor": null,
|
|
320
|
+
"deprecated": false,
|
|
321
|
+
"http": "POST /v1/client/approvals/{approval_id}/decision",
|
|
322
|
+
"idempotent": false,
|
|
323
|
+
"method": "decide",
|
|
324
|
+
"paginated": false,
|
|
325
|
+
"params": "Notify.MeApprovalDecideParams",
|
|
326
|
+
"poll": null,
|
|
327
|
+
"public": false,
|
|
328
|
+
"resource": "approvals",
|
|
329
|
+
"scope": "client",
|
|
330
|
+
"signature": "notify.client({ token }).approvals.decide(approvalId, params, options?): Notify.Approval",
|
|
331
|
+
"snippet": "const approval = await notify.client({ token: \"rt_example_recipient_token\" }).approvals.decide(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { decision: \"approve\" });"
|
|
332
|
+
},
|
|
333
|
+
"ClientApprovalsController_retrieve": {
|
|
334
|
+
"actor": null,
|
|
335
|
+
"deprecated": false,
|
|
336
|
+
"http": "GET /v1/client/approvals/{approval_id}",
|
|
337
|
+
"idempotent": false,
|
|
338
|
+
"method": "retrieve",
|
|
339
|
+
"paginated": false,
|
|
340
|
+
"params": null,
|
|
341
|
+
"poll": null,
|
|
342
|
+
"public": false,
|
|
343
|
+
"resource": "approvals",
|
|
344
|
+
"scope": "client",
|
|
345
|
+
"signature": "notify.client({ token }).approvals.retrieve(approvalId, options?): Notify.Approval",
|
|
346
|
+
"snippet": "const approval = await notify.client({ token: \"rt_example_recipient_token\" }).approvals.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");"
|
|
347
|
+
},
|
|
243
348
|
"ClientController_counts": {
|
|
244
349
|
"actor": null,
|
|
245
350
|
"deprecated": false,
|
|
@@ -1003,7 +1108,7 @@
|
|
|
1003
1108
|
"resource": "notificationTypes",
|
|
1004
1109
|
"scope": null,
|
|
1005
1110
|
"signature": "notify.notificationTypes.update(typeId, params?, options?): Notify.NotificationType",
|
|
1006
|
-
"snippet": "const notificationType = await notify.notificationTypes.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n
|
|
1111
|
+
"snippet": "const notificationType = await notify.notificationTypes.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n approval: { default_expires_in_seconds: 86400, reason: \"optional\", timeout_outcome: \"expired\" },\n});"
|
|
1007
1112
|
},
|
|
1008
1113
|
"TypesController_versions": {
|
|
1009
1114
|
"actor": null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@productcraft/notify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|