@proveanything/smartlinks 1.2.0 → 1.2.1
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/API_SUMMARY.md +11 -21
- package/dist/api/comms.d.ts +1 -1
- package/dist/types/comms.d.ts +9 -19
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1 | Generated: 2026-01-21T17:11:59.946Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -823,26 +823,6 @@ interface PushSubscriptionJSON {
|
|
|
823
823
|
}
|
|
824
824
|
```
|
|
825
825
|
|
|
826
|
-
**PushSubscribeMeta** (interface)
|
|
827
|
-
```typescript
|
|
828
|
-
interface PushSubscribeMeta {
|
|
829
|
-
collectionId: string
|
|
830
|
-
contactId?: string
|
|
831
|
-
userId?: string
|
|
832
|
-
productId?: string
|
|
833
|
-
labels?: Record<string, string>
|
|
834
|
-
[key: string]: any
|
|
835
|
-
}
|
|
836
|
-
```
|
|
837
|
-
|
|
838
|
-
**PushSubscribeRequest** (interface)
|
|
839
|
-
```typescript
|
|
840
|
-
interface PushSubscribeRequest {
|
|
841
|
-
subscription: PushSubscriptionJSON
|
|
842
|
-
meta: PushSubscribeMeta
|
|
843
|
-
}
|
|
844
|
-
```
|
|
845
|
-
|
|
846
826
|
**PushVapidResponse** (interface)
|
|
847
827
|
```typescript
|
|
848
828
|
interface PushVapidResponse {
|
|
@@ -857,6 +837,16 @@ interface PushSubscribeResponse {
|
|
|
857
837
|
}
|
|
858
838
|
```
|
|
859
839
|
|
|
840
|
+
**RegisterPushMethodRequest** (interface)
|
|
841
|
+
```typescript
|
|
842
|
+
interface RegisterPushMethodRequest {
|
|
843
|
+
contactId: string
|
|
844
|
+
endpoint: string
|
|
845
|
+
keys: { p256dh: string; auth: string }
|
|
846
|
+
meta?: Record<string, any>
|
|
847
|
+
}
|
|
848
|
+
```
|
|
849
|
+
|
|
860
850
|
**CommsSettings** (interface)
|
|
861
851
|
```typescript
|
|
862
852
|
interface CommsSettings {
|
package/dist/api/comms.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare namespace comms {
|
|
|
13
13
|
* Public: Register a Web Push subscription under unified comms.
|
|
14
14
|
* POST /public/collection/:collectionId/comm/push/register
|
|
15
15
|
*/
|
|
16
|
-
function registerPush(collectionId: string, body: import("../types/comms").
|
|
16
|
+
function registerPush(collectionId: string, body: import("../types/comms").RegisterPushMethodRequest): Promise<import("../types/comms").PushSubscribeResponse>;
|
|
17
17
|
/**
|
|
18
18
|
* Admin: Get current comms settings for a collection.
|
|
19
19
|
* GET /admin/collection/:collectionId/comm.settings
|
package/dist/types/comms.d.ts
CHANGED
|
@@ -108,25 +108,6 @@ export interface PushSubscriptionJSON {
|
|
|
108
108
|
auth?: string;
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
export interface PushSubscribeMeta {
|
|
112
|
-
/** Required collection scope */
|
|
113
|
-
collectionId: string;
|
|
114
|
-
/** Optional explicit contact ID */
|
|
115
|
-
contactId?: string;
|
|
116
|
-
/** Optional user ID; may be mapped to a contact like "user:{userId}" */
|
|
117
|
-
userId?: string;
|
|
118
|
-
/** Optional product scope */
|
|
119
|
-
productId?: string;
|
|
120
|
-
/** Optional labels and arbitrary metadata */
|
|
121
|
-
labels?: Record<string, string>;
|
|
122
|
-
[key: string]: any;
|
|
123
|
-
}
|
|
124
|
-
export interface PushSubscribeRequest {
|
|
125
|
-
/** Browser/service worker subscription payload */
|
|
126
|
-
subscription: PushSubscriptionJSON;
|
|
127
|
-
/** Metadata and scoping */
|
|
128
|
-
meta: PushSubscribeMeta;
|
|
129
|
-
}
|
|
130
111
|
export interface PushVapidResponse {
|
|
131
112
|
publicKey: string;
|
|
132
113
|
}
|
|
@@ -134,6 +115,15 @@ export interface PushSubscribeResponse {
|
|
|
134
115
|
ok: true;
|
|
135
116
|
id: string;
|
|
136
117
|
}
|
|
118
|
+
export interface RegisterPushMethodRequest {
|
|
119
|
+
contactId: string;
|
|
120
|
+
endpoint: string;
|
|
121
|
+
keys: {
|
|
122
|
+
p256dh: string;
|
|
123
|
+
auth: string;
|
|
124
|
+
};
|
|
125
|
+
meta?: Record<string, any>;
|
|
126
|
+
}
|
|
137
127
|
export interface CommsSettings {
|
|
138
128
|
unsub?: {
|
|
139
129
|
requireToken?: boolean;
|