@proveanything/smartlinks 1.3.6 → 1.3.8
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/dist/api/collection.d.ts +8 -1
- package/dist/api/collection.js +11 -0
- package/dist/docs/API_SUMMARY.md +289 -245
- package/dist/types/collection.d.ts +42 -0
- package/docs/API_SUMMARY.md +35 -1
- package/package.json +3 -3
package/dist/api/collection.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionResponse, CollectionCreateRequest, CollectionUpdateRequest } from "../types/collection";
|
|
1
|
+
import { CollectionResponse, CollectionCreateRequest, CollectionUpdateRequest, AppsConfigResponse } from "../types/collection";
|
|
2
2
|
export declare namespace collection {
|
|
3
3
|
/**
|
|
4
4
|
* Retrieves a single Collection by its ID.
|
|
@@ -28,6 +28,13 @@ export declare namespace collection {
|
|
|
28
28
|
* @returns Promise resolving to the settings object
|
|
29
29
|
*/
|
|
30
30
|
function getSettings(collectionId: string, settingGroup: string, admin?: boolean): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve all configured app module definitions for a collection (public endpoint).
|
|
33
|
+
* @param collectionId – Identifier of the collection
|
|
34
|
+
* @returns Promise resolving to an AppsConfigResponse containing all app configurations
|
|
35
|
+
* @throws ErrorResponse if the request fails
|
|
36
|
+
*/
|
|
37
|
+
function getAppsConfig(collectionId: string): Promise<AppsConfigResponse>;
|
|
31
38
|
/**
|
|
32
39
|
* Update a specific settings group for a collection (admin endpoint).
|
|
33
40
|
* @param collectionId – Identifier of the collection
|
package/dist/api/collection.js
CHANGED
|
@@ -49,6 +49,17 @@ export var collection;
|
|
|
49
49
|
return request(path);
|
|
50
50
|
}
|
|
51
51
|
collection.getSettings = getSettings;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieve all configured app module definitions for a collection (public endpoint).
|
|
54
|
+
* @param collectionId – Identifier of the collection
|
|
55
|
+
* @returns Promise resolving to an AppsConfigResponse containing all app configurations
|
|
56
|
+
* @throws ErrorResponse if the request fails
|
|
57
|
+
*/
|
|
58
|
+
async function getAppsConfig(collectionId) {
|
|
59
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/apps-config`;
|
|
60
|
+
return request(path);
|
|
61
|
+
}
|
|
62
|
+
collection.getAppsConfig = getAppsConfig;
|
|
52
63
|
/**
|
|
53
64
|
* Update a specific settings group for a collection (admin endpoint).
|
|
54
65
|
* @param collectionId – Identifier of the collection
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8 | Generated: 2026-02-05T19:14:34.871Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -856,6 +856,37 @@ interface Collection {
|
|
|
856
856
|
}
|
|
857
857
|
```
|
|
858
858
|
|
|
859
|
+
**AppConfig** (interface)
|
|
860
|
+
```typescript
|
|
861
|
+
interface AppConfig {
|
|
862
|
+
id: string
|
|
863
|
+
srcAppId: string
|
|
864
|
+
name: string
|
|
865
|
+
description?: string
|
|
866
|
+
faIcon?: string
|
|
867
|
+
category: "Authenticity" | "Documentation" | "Commerce" | "Engagement" | "AI" | "Digital Product Passports" | "Integration" | "Web3" | "Other";
|
|
868
|
+
active?: boolean
|
|
869
|
+
ownersOnly?: boolean
|
|
870
|
+
hidden?: boolean
|
|
871
|
+
publicIframeUrl?: string
|
|
872
|
+
supportsDeepLinks?: boolean;
|
|
873
|
+
usage: {
|
|
874
|
+
collection: boolean; // use at the collecton level
|
|
875
|
+
product: boolean; // use at the product level
|
|
876
|
+
proof: boolean; // use at the proof level
|
|
877
|
+
widget: boolean; // has a widget component available
|
|
878
|
+
}
|
|
879
|
+
[key: string]: any
|
|
880
|
+
}
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
**AppsConfigResponse** (interface)
|
|
884
|
+
```typescript
|
|
885
|
+
interface AppsConfigResponse {
|
|
886
|
+
apps: AppConfig[]
|
|
887
|
+
}
|
|
888
|
+
```
|
|
889
|
+
|
|
859
890
|
**CollectionResponse** = `Collection`
|
|
860
891
|
|
|
861
892
|
**CollectionCreateRequest** = `Omit<Collection, 'id' | 'shortId'>`
|
|
@@ -2545,61 +2576,61 @@ type AppConfigOptions = {
|
|
|
2545
2576
|
|
|
2546
2577
|
**LoginResponse** (type)
|
|
2547
2578
|
```typescript
|
|
2548
|
-
type LoginResponse = {
|
|
2549
|
-
id: string
|
|
2550
|
-
name: string
|
|
2551
|
-
email: string
|
|
2552
|
-
bearerToken: string
|
|
2553
|
-
account: Record<string, any>
|
|
2579
|
+
type LoginResponse = {
|
|
2580
|
+
id: string
|
|
2581
|
+
name: string
|
|
2582
|
+
email: string
|
|
2583
|
+
bearerToken: string
|
|
2584
|
+
account: Record<string, any>
|
|
2554
2585
|
}
|
|
2555
2586
|
```
|
|
2556
2587
|
|
|
2557
2588
|
**VerifyTokenResponse** (type)
|
|
2558
2589
|
```typescript
|
|
2559
|
-
type VerifyTokenResponse = {
|
|
2560
|
-
valid: boolean
|
|
2561
|
-
id?: string
|
|
2562
|
-
name?: string
|
|
2563
|
-
email?: string
|
|
2564
|
-
account?: Record<string, any>
|
|
2590
|
+
type VerifyTokenResponse = {
|
|
2591
|
+
valid: boolean
|
|
2592
|
+
id?: string
|
|
2593
|
+
name?: string
|
|
2594
|
+
email?: string
|
|
2595
|
+
account?: Record<string, any>
|
|
2565
2596
|
}
|
|
2566
2597
|
```
|
|
2567
2598
|
|
|
2568
2599
|
**AccountInfoResponse** (type)
|
|
2569
2600
|
```typescript
|
|
2570
|
-
type AccountInfoResponse = {
|
|
2571
|
-
accessType: string;
|
|
2572
|
-
analyticsCode: string;
|
|
2573
|
-
analyticsId: string;
|
|
2574
|
-
auth_time: number;
|
|
2575
|
-
baseCollectionId: string;
|
|
2576
|
-
clientType: string;
|
|
2577
|
-
email: string;
|
|
2578
|
-
email_verified: boolean;
|
|
2579
|
-
features: {
|
|
2580
|
-
actionLogger: boolean;
|
|
2581
|
-
adminCollections: boolean;
|
|
2582
|
-
adminApps: boolean;
|
|
2583
|
-
apiKeys: boolean;
|
|
2584
|
-
adminUsers: boolean;
|
|
2585
|
-
[key: string]: boolean;
|
|
2586
|
-
};
|
|
2587
|
-
iat: number;
|
|
2588
|
-
id: string;
|
|
2589
|
-
iss: string;
|
|
2590
|
-
location: string | null;
|
|
2591
|
-
name: string;
|
|
2592
|
-
picture: string;
|
|
2593
|
-
sites: {
|
|
2594
|
-
[siteName: string]: boolean;
|
|
2595
|
-
};
|
|
2596
|
-
sub: string;
|
|
2597
|
-
uid: string;
|
|
2598
|
-
userId: string;
|
|
2599
|
-
contactId: string
|
|
2600
|
-
whitelabel: {
|
|
2601
|
-
[key: string]: any;
|
|
2602
|
-
}
|
|
2601
|
+
type AccountInfoResponse = {
|
|
2602
|
+
accessType: string;
|
|
2603
|
+
analyticsCode: string;
|
|
2604
|
+
analyticsId: string;
|
|
2605
|
+
auth_time: number;
|
|
2606
|
+
baseCollectionId: string;
|
|
2607
|
+
clientType: string;
|
|
2608
|
+
email: string;
|
|
2609
|
+
email_verified: boolean;
|
|
2610
|
+
features: {
|
|
2611
|
+
actionLogger: boolean;
|
|
2612
|
+
adminCollections: boolean;
|
|
2613
|
+
adminApps: boolean;
|
|
2614
|
+
apiKeys: boolean;
|
|
2615
|
+
adminUsers: boolean;
|
|
2616
|
+
[key: string]: boolean;
|
|
2617
|
+
};
|
|
2618
|
+
iat: number;
|
|
2619
|
+
id: string;
|
|
2620
|
+
iss: string;
|
|
2621
|
+
location: string | null;
|
|
2622
|
+
name: string;
|
|
2623
|
+
picture: string;
|
|
2624
|
+
sites: {
|
|
2625
|
+
[siteName: string]: boolean;
|
|
2626
|
+
};
|
|
2627
|
+
sub: string;
|
|
2628
|
+
uid: string;
|
|
2629
|
+
userId: string;
|
|
2630
|
+
contactId: string
|
|
2631
|
+
whitelabel: {
|
|
2632
|
+
[key: string]: any;
|
|
2633
|
+
}
|
|
2603
2634
|
}
|
|
2604
2635
|
```
|
|
2605
2636
|
|
|
@@ -2607,15 +2638,15 @@ type AccountInfoResponse = {
|
|
|
2607
2638
|
|
|
2608
2639
|
### ai
|
|
2609
2640
|
|
|
2610
|
-
**generateContent**(collectionId: string,
|
|
2611
|
-
params: AIGenerateContentRequest,
|
|
2641
|
+
**generateContent**(collectionId: string,
|
|
2642
|
+
params: AIGenerateContentRequest,
|
|
2612
2643
|
admin: boolean = true) → `Promise<any>`
|
|
2613
2644
|
Generate text/content via AI (admin)
|
|
2614
2645
|
|
|
2615
2646
|
**generateImage**(collectionId: string, params: AIGenerateImageRequest) → `Promise<any>`
|
|
2616
2647
|
Generate an image via AI (admin)
|
|
2617
2648
|
|
|
2618
|
-
**searchPhotos**(collectionId: string,
|
|
2649
|
+
**searchPhotos**(collectionId: string,
|
|
2619
2650
|
params: AISearchPhotosRequest) → `Promise<AISearchPhotosPhoto[]>`
|
|
2620
2651
|
Search stock photos or similar via AI (admin)
|
|
2621
2652
|
|
|
@@ -2659,39 +2690,39 @@ Post a chat message to the AI (admin or public)
|
|
|
2659
2690
|
**upload**(options: UploadAssetOptions) → `Promise<Asset>`
|
|
2660
2691
|
Upload an asset file
|
|
2661
2692
|
|
|
2662
|
-
**getForCollection**(collectionId: string,
|
|
2693
|
+
**getForCollection**(collectionId: string,
|
|
2663
2694
|
assetId: string) → `Promise<AssetResponse>`
|
|
2664
2695
|
Upload an asset file
|
|
2665
2696
|
|
|
2666
2697
|
**listForCollection**(collectionId: string) → `Promise<AssetResponse[]>`
|
|
2667
2698
|
Upload an asset file
|
|
2668
2699
|
|
|
2669
|
-
**getForProduct**(collectionId: string,
|
|
2670
|
-
productId: string,
|
|
2700
|
+
**getForProduct**(collectionId: string,
|
|
2701
|
+
productId: string,
|
|
2671
2702
|
assetId: string) → `Promise<AssetResponse>`
|
|
2672
2703
|
Upload an asset file
|
|
2673
2704
|
|
|
2674
|
-
**listForProduct**(collectionId: string,
|
|
2705
|
+
**listForProduct**(collectionId: string,
|
|
2675
2706
|
productId: string) → `Promise<AssetResponse[]>`
|
|
2676
2707
|
Upload an asset file
|
|
2677
2708
|
|
|
2678
|
-
**getForProof**(collectionId: string,
|
|
2679
|
-
productId: string,
|
|
2680
|
-
proofId: string,
|
|
2709
|
+
**getForProof**(collectionId: string,
|
|
2710
|
+
productId: string,
|
|
2711
|
+
proofId: string,
|
|
2681
2712
|
assetId: string) → `Promise<AssetResponse>`
|
|
2682
2713
|
Upload an asset file
|
|
2683
2714
|
|
|
2684
|
-
**listForProof**(collectionId: string,
|
|
2685
|
-
productId: string,
|
|
2686
|
-
proofId: string,
|
|
2715
|
+
**listForProof**(collectionId: string,
|
|
2716
|
+
productId: string,
|
|
2717
|
+
proofId: string,
|
|
2687
2718
|
appId?: string) → `Promise<AssetResponse[]>`
|
|
2688
2719
|
Upload an asset file
|
|
2689
2720
|
|
|
2690
|
-
**uploadAsset**(collectionId: string,
|
|
2691
|
-
productId: string,
|
|
2692
|
-
proofId: string,
|
|
2693
|
-
file: File,
|
|
2694
|
-
extraData?: Record<string, any>,
|
|
2721
|
+
**uploadAsset**(collectionId: string,
|
|
2722
|
+
productId: string,
|
|
2723
|
+
proofId: string,
|
|
2724
|
+
file: File,
|
|
2725
|
+
extraData?: Record<string, any>,
|
|
2695
2726
|
onProgress?: (percent: number) → `void`
|
|
2696
2727
|
Uploads an asset file to a proof, with optional extraData as JSON. Supports progress reporting via onProgress callback (browser only).
|
|
2697
2728
|
|
|
@@ -2706,43 +2737,43 @@ Remove an asset by id within a scope (admin)
|
|
|
2706
2737
|
|
|
2707
2738
|
### async
|
|
2708
2739
|
|
|
2709
|
-
**enqueueAsyncJob**(collectionId: string,
|
|
2740
|
+
**enqueueAsyncJob**(collectionId: string,
|
|
2710
2741
|
params: EnqueueAsyncJobRequest) → `Promise<EnqueueAsyncJobResponse>`
|
|
2711
2742
|
Enqueue a background job for a collection POST /admin/collection/:collectionId/async/jobs (202)
|
|
2712
2743
|
|
|
2713
|
-
**getAsyncJobStatus**(collectionId: string,
|
|
2744
|
+
**getAsyncJobStatus**(collectionId: string,
|
|
2714
2745
|
jobId: number) → `Promise<Job>`
|
|
2715
2746
|
Get job status by ID (may return 404 if completed/removed) GET /admin/collection/:collectionId/async/jobs/:jobId
|
|
2716
2747
|
|
|
2717
2748
|
### attestation
|
|
2718
2749
|
|
|
2719
|
-
**list**(collectionId: string,
|
|
2720
|
-
productId: string,
|
|
2750
|
+
**list**(collectionId: string,
|
|
2751
|
+
productId: string,
|
|
2721
2752
|
proofId: string) → `Promise<AttestationResponse[]>`
|
|
2722
2753
|
List all attestations for a proof.
|
|
2723
2754
|
|
|
2724
|
-
**get**(collectionId: string,
|
|
2725
|
-
productId: string,
|
|
2726
|
-
proofId: string,
|
|
2755
|
+
**get**(collectionId: string,
|
|
2756
|
+
productId: string,
|
|
2757
|
+
proofId: string,
|
|
2727
2758
|
attestationId: string) → `Promise<AttestationResponse>`
|
|
2728
2759
|
Get a single attestation by ID.
|
|
2729
2760
|
|
|
2730
|
-
**create**(collectionId: string,
|
|
2731
|
-
productId: string,
|
|
2732
|
-
proofId: string,
|
|
2761
|
+
**create**(collectionId: string,
|
|
2762
|
+
productId: string,
|
|
2763
|
+
proofId: string,
|
|
2733
2764
|
data: AttestationCreateRequest) → `Promise<AttestationResponse>`
|
|
2734
2765
|
Create a new attestation for a proof.
|
|
2735
2766
|
|
|
2736
|
-
**update**(collectionId: string,
|
|
2737
|
-
productId: string,
|
|
2738
|
-
proofId: string,
|
|
2739
|
-
attestationId: string,
|
|
2767
|
+
**update**(collectionId: string,
|
|
2768
|
+
productId: string,
|
|
2769
|
+
proofId: string,
|
|
2770
|
+
attestationId: string,
|
|
2740
2771
|
data: AttestationUpdateRequest) → `Promise<AttestationResponse>`
|
|
2741
2772
|
Update an attestation.
|
|
2742
2773
|
|
|
2743
|
-
**remove**(collectionId: string,
|
|
2744
|
-
productId: string,
|
|
2745
|
-
proofId: string,
|
|
2774
|
+
**remove**(collectionId: string,
|
|
2775
|
+
productId: string,
|
|
2776
|
+
proofId: string,
|
|
2746
2777
|
attestationId: string) → `Promise<void>`
|
|
2747
2778
|
Delete an attestation.
|
|
2748
2779
|
|
|
@@ -2766,11 +2797,11 @@ Requests a JWT for the current user and a specific collection/product/proof Vali
|
|
|
2766
2797
|
**registerUser**(user: UserAccountRegistrationRequest) → `Promise<LoginResponse>`
|
|
2767
2798
|
Tries to register a new user account. Can return a bearer token, or a Firebase token
|
|
2768
2799
|
|
|
2769
|
-
**getUserToken**(opts?: {
|
|
2770
|
-
email?: string
|
|
2771
|
-
collectionId?: string
|
|
2772
|
-
userId?: string
|
|
2773
|
-
expiry?: string
|
|
2800
|
+
**getUserToken**(opts?: {
|
|
2801
|
+
email?: string
|
|
2802
|
+
collectionId?: string
|
|
2803
|
+
userId?: string
|
|
2804
|
+
expiry?: string
|
|
2774
2805
|
}) → `Promise<`
|
|
2775
2806
|
Admin: Get a user bearer token (impersonation/automation). POST /admin/auth/userToken All fields are optional; at least one identifier should be provided.
|
|
2776
2807
|
|
|
@@ -2859,91 +2890,91 @@ Verify phone verification code (public).
|
|
|
2859
2890
|
|
|
2860
2891
|
### batch
|
|
2861
2892
|
|
|
2862
|
-
**get**(collectionId: string,
|
|
2863
|
-
productId: string,
|
|
2893
|
+
**get**(collectionId: string,
|
|
2894
|
+
productId: string,
|
|
2864
2895
|
batchId: string) → `Promise<BatchResponse>`
|
|
2865
2896
|
Get a single batch by ID for a collection and product (admin only).
|
|
2866
2897
|
|
|
2867
|
-
**list**(collectionId: string,
|
|
2898
|
+
**list**(collectionId: string,
|
|
2868
2899
|
productId: string) → `Promise<BatchResponse[]>`
|
|
2869
2900
|
List all batches for a collection and product (admin only).
|
|
2870
2901
|
|
|
2871
|
-
**create**(collectionId: string,
|
|
2872
|
-
productId: string,
|
|
2902
|
+
**create**(collectionId: string,
|
|
2903
|
+
productId: string,
|
|
2873
2904
|
data: BatchCreateRequest) → `Promise<BatchResponse>`
|
|
2874
2905
|
Create a new batch for a collection and product (admin only).
|
|
2875
2906
|
|
|
2876
|
-
**update**(collectionId: string,
|
|
2877
|
-
productId: string,
|
|
2878
|
-
batchId: string,
|
|
2907
|
+
**update**(collectionId: string,
|
|
2908
|
+
productId: string,
|
|
2909
|
+
batchId: string,
|
|
2879
2910
|
data: BatchUpdateRequest) → `Promise<BatchResponse>`
|
|
2880
2911
|
Update a batch for a collection and product (admin only).
|
|
2881
2912
|
|
|
2882
|
-
**remove**(collectionId: string,
|
|
2883
|
-
productId: string,
|
|
2913
|
+
**remove**(collectionId: string,
|
|
2914
|
+
productId: string,
|
|
2884
2915
|
batchId: string) → `Promise<void>`
|
|
2885
2916
|
Delete a batch for a collection and product (admin only).
|
|
2886
2917
|
|
|
2887
|
-
**getPublic**(collectionId: string,
|
|
2888
|
-
productId: string,
|
|
2918
|
+
**getPublic**(collectionId: string,
|
|
2919
|
+
productId: string,
|
|
2889
2920
|
batchId: string) → `Promise<BatchResponse>`
|
|
2890
2921
|
Get a single batch by ID for a collection and product (public endpoint).
|
|
2891
2922
|
|
|
2892
|
-
**getSN**(collectionId: string,
|
|
2893
|
-
productId: string,
|
|
2894
|
-
batchId: string,
|
|
2895
|
-
startIndex: number = 0,
|
|
2923
|
+
**getSN**(collectionId: string,
|
|
2924
|
+
productId: string,
|
|
2925
|
+
batchId: string,
|
|
2926
|
+
startIndex: number = 0,
|
|
2896
2927
|
count: number = 10) → `Promise<any>`
|
|
2897
2928
|
Get serial numbers for a batch (admin only).
|
|
2898
2929
|
|
|
2899
|
-
**lookupSN**(collectionId: string,
|
|
2900
|
-
productId: string,
|
|
2901
|
-
batchId: string,
|
|
2930
|
+
**lookupSN**(collectionId: string,
|
|
2931
|
+
productId: string,
|
|
2932
|
+
batchId: string,
|
|
2902
2933
|
codeId: string) → `Promise<any>`
|
|
2903
2934
|
Look up a serial number by code for a batch (admin only).
|
|
2904
2935
|
|
|
2905
2936
|
### broadcasts
|
|
2906
2937
|
|
|
2907
|
-
**create**(collectionId: string,
|
|
2938
|
+
**create**(collectionId: string,
|
|
2908
2939
|
body: Omit<BroadcastRecord, 'id' | 'collectionId' | 'createdAt'>) → `Promise<BroadcastRecord>`
|
|
2909
2940
|
|
|
2910
|
-
**list**(collectionId: string,
|
|
2941
|
+
**list**(collectionId: string,
|
|
2911
2942
|
query: ListBroadcastsQuery = {}) → `Promise<BroadcastList>`
|
|
2912
2943
|
|
|
2913
|
-
**get**(collectionId: string,
|
|
2944
|
+
**get**(collectionId: string,
|
|
2914
2945
|
id: string) → `Promise<BroadcastRecord>`
|
|
2915
2946
|
|
|
2916
|
-
**update**(collectionId: string,
|
|
2917
|
-
id: string,
|
|
2947
|
+
**update**(collectionId: string,
|
|
2948
|
+
id: string,
|
|
2918
2949
|
body: Partial<Omit<BroadcastRecord, 'id' | 'collectionId' | 'createdAt'>>) → `Promise<BroadcastRecord>`
|
|
2919
2950
|
|
|
2920
|
-
**remove**(collectionId: string,
|
|
2951
|
+
**remove**(collectionId: string,
|
|
2921
2952
|
id: string) → `Promise<void>`
|
|
2922
2953
|
|
|
2923
|
-
**recipients**(collectionId: string,
|
|
2924
|
-
id: string,
|
|
2954
|
+
**recipients**(collectionId: string,
|
|
2955
|
+
id: string,
|
|
2925
2956
|
query: { limit?: number; offset?: number } = {}) → `Promise<BroadcastRecipientsResponse>`
|
|
2926
2957
|
|
|
2927
|
-
**preview**(collectionId: string,
|
|
2928
|
-
id: string,
|
|
2958
|
+
**preview**(collectionId: string,
|
|
2959
|
+
id: string,
|
|
2929
2960
|
body: BroadcastPreviewRequest) → `Promise<BroadcastPreviewResponse>`
|
|
2930
2961
|
|
|
2931
|
-
**send**(collectionId: string,
|
|
2932
|
-
id: string,
|
|
2962
|
+
**send**(collectionId: string,
|
|
2963
|
+
id: string,
|
|
2933
2964
|
body: BroadcastSendRequest = {}) → `Promise<`
|
|
2934
2965
|
|
|
2935
|
-
**sendTest**(collectionId: string,
|
|
2936
|
-
id: string,
|
|
2966
|
+
**sendTest**(collectionId: string,
|
|
2967
|
+
id: string,
|
|
2937
2968
|
body: BroadcastSendTestRequest) → `Promise<BroadcastSendTestResponse>`
|
|
2938
2969
|
|
|
2939
|
-
**sendManual**(collectionId: string,
|
|
2940
|
-
id: string,
|
|
2970
|
+
**sendManual**(collectionId: string,
|
|
2971
|
+
id: string,
|
|
2941
2972
|
body: BroadcastSendManualRequest) → `Promise<BroadcastSendManualResponse>`
|
|
2942
2973
|
|
|
2943
|
-
**append**(collectionId: string,
|
|
2974
|
+
**append**(collectionId: string,
|
|
2944
2975
|
body: BroadcastAppendEventBody) → `Promise<AppendResult>`
|
|
2945
2976
|
|
|
2946
|
-
**appendBulk**(collectionId: string,
|
|
2977
|
+
**appendBulk**(collectionId: string,
|
|
2947
2978
|
body: BroadcastAppendBulkBody) → `Promise<AppendBulkResult>`
|
|
2948
2979
|
|
|
2949
2980
|
### claimSet
|
|
@@ -2998,6 +3029,9 @@ Retrieve a collection by its shortId (public endpoint).
|
|
|
2998
3029
|
**getSettings**(collectionId: string, settingGroup: string, admin?: boolean) → `Promise<any>`
|
|
2999
3030
|
Retrieve a specific settings group for a collection (public endpoint).
|
|
3000
3031
|
|
|
3032
|
+
**getAppsConfig**(collectionId: string) → `Promise<AppsConfigResponse>`
|
|
3033
|
+
Retrieve all configured app module definitions for a collection (public endpoint).
|
|
3034
|
+
|
|
3001
3035
|
**updateSettings**(collectionId: string, settingGroup: string, settings: any) → `Promise<any>`
|
|
3002
3036
|
Update a specific settings group for a collection (admin endpoint).
|
|
3003
3037
|
|
|
@@ -3029,78 +3063,78 @@ Assign a value to a serial number for a collection (admin only).
|
|
|
3029
3063
|
**getPushVapidPublicKey**(collectionId: string) → `Promise<import("../types/comms").PushVapidResponse>`
|
|
3030
3064
|
Public: Get VAPID public key used for Web Push subscriptions. GET /public/collection/:collectionId/comm/push/vapidPublicKey Note: Key may be global; path is collection-scoped for consistency.
|
|
3031
3065
|
|
|
3032
|
-
**registerPush**(collectionId: string,
|
|
3066
|
+
**registerPush**(collectionId: string,
|
|
3033
3067
|
body: import("../types/comms") → `void`
|
|
3034
3068
|
Public: Register a Web Push subscription under unified comms. POST /public/collection/:collectionId/comm/push/register
|
|
3035
3069
|
|
|
3036
|
-
**getSettings**(collectionId: string,
|
|
3070
|
+
**getSettings**(collectionId: string,
|
|
3037
3071
|
opts: { includeSecret?: boolean } = {}) → `Promise<import("../types/comms").CommsSettingsGetResponse>`
|
|
3038
3072
|
Admin: Get current comms settings for a collection. GET /admin/collection/:collectionId/comm.settings Optional query: includeSecret=true to include unsub.secret in response.
|
|
3039
3073
|
|
|
3040
|
-
**patchSettings**(collectionId: string,
|
|
3074
|
+
**patchSettings**(collectionId: string,
|
|
3041
3075
|
body: import("../types/comms") → `void`
|
|
3042
3076
|
Admin: Patch comms settings for a collection. PATCH /admin/collection/:collectionId/comm.settings
|
|
3043
3077
|
|
|
3044
3078
|
**getPublicTopics**(collectionId: string) → `Promise<import("../types/comms").CommsPublicTopicsResponse>`
|
|
3045
3079
|
Public: Fetch configured topics for a collection. GET /public/collection/:collectionId/comm/topics
|
|
3046
3080
|
|
|
3047
|
-
**unsubscribe**(collectionId: string,
|
|
3081
|
+
**unsubscribe**(collectionId: string,
|
|
3048
3082
|
query: import("../types/comms") → `void`
|
|
3049
3083
|
Public: Unsubscribe a contact from a category or channel. GET /public/collection/:collectionId/comm/unsubscribe
|
|
3050
3084
|
|
|
3051
|
-
**upsertConsent**(collectionId: string,
|
|
3085
|
+
**upsertConsent**(collectionId: string,
|
|
3052
3086
|
body: import("../types/comms") → `void`
|
|
3053
3087
|
Public: Upsert default consent for a contact. POST /public/collection/:collectionId/comm/consent
|
|
3054
3088
|
|
|
3055
|
-
**upsertPreferences**(collectionId: string,
|
|
3089
|
+
**upsertPreferences**(collectionId: string,
|
|
3056
3090
|
body: import("../types/comms") → `void`
|
|
3057
3091
|
Public: Upsert preferences for a specific subject (or default if subject omitted). POST /public/collection/:collectionId/comm/preferences
|
|
3058
3092
|
|
|
3059
|
-
**subscribe**(collectionId: string,
|
|
3093
|
+
**subscribe**(collectionId: string,
|
|
3060
3094
|
body: import("../types/comms") → `void`
|
|
3061
3095
|
Public: Subscribe/unsubscribe contact to a subject. POST /public/collection/:collectionId/comm/subscribe
|
|
3062
3096
|
|
|
3063
|
-
**checkSubscription**(collectionId: string,
|
|
3097
|
+
**checkSubscription**(collectionId: string,
|
|
3064
3098
|
query: import("../types/comms") → `void`
|
|
3065
3099
|
Public: Check subscription status for a subject. GET /public/collection/:collectionId/comm/subscription/check
|
|
3066
3100
|
|
|
3067
|
-
**listMethods**(collectionId: string,
|
|
3101
|
+
**listMethods**(collectionId: string,
|
|
3068
3102
|
query: import("../types/comms") → `void`
|
|
3069
3103
|
Public: List registered contact methods. GET /public/collection/:collectionId/comm/methods
|
|
3070
3104
|
|
|
3071
|
-
**registerEmail**(collectionId: string,
|
|
3105
|
+
**registerEmail**(collectionId: string,
|
|
3072
3106
|
body: import("../types/comms") → `void`
|
|
3073
3107
|
Public: Register email method for a contact. POST /public/collection/:collectionId/comm/email/register
|
|
3074
3108
|
|
|
3075
|
-
**registerSms**(collectionId: string,
|
|
3109
|
+
**registerSms**(collectionId: string,
|
|
3076
3110
|
body: import("../types/comms") → `void`
|
|
3077
3111
|
Public: Register SMS method for a contact. POST /public/collection/:collectionId/comm/sms/register
|
|
3078
3112
|
|
|
3079
|
-
**resolveSubscriptions**(collectionId: string,
|
|
3113
|
+
**resolveSubscriptions**(collectionId: string,
|
|
3080
3114
|
body: import("../types/comms") → `void`
|
|
3081
3115
|
Public: Resolve contacts for a subject with identity hints. POST /public/collection/:collectionId/comm/subscriptions/resolve
|
|
3082
3116
|
|
|
3083
|
-
**queryByUser**(collectionId: string,
|
|
3117
|
+
**queryByUser**(collectionId: string,
|
|
3084
3118
|
body: CommsQueryByUser = {}) → `Promise<CommunicationEvent[]>`
|
|
3085
3119
|
Analytics: Query communication events by user or contact. POST /admin/collection/:collectionId/comm/query/by-user
|
|
3086
3120
|
|
|
3087
|
-
**queryRecipientIds**(collectionId: string,
|
|
3121
|
+
**queryRecipientIds**(collectionId: string,
|
|
3088
3122
|
body: CommsRecipientIdsQuery) → `Promise<RecipientId[]>`
|
|
3089
3123
|
Analytics: Recipient IDs for a communication source. POST /admin/collection/:collectionId/comm/query/recipient-ids
|
|
3090
3124
|
|
|
3091
|
-
**queryRecipientsWithoutAction**(collectionId: string,
|
|
3125
|
+
**queryRecipientsWithoutAction**(collectionId: string,
|
|
3092
3126
|
body: CommsRecipientsWithoutActionQuery) → `Promise<RecipientId[]>`
|
|
3093
3127
|
Analytics: Recipients who did not perform an action. POST /admin/collection/:collectionId/comm/query/recipients/without-action
|
|
3094
3128
|
|
|
3095
|
-
**queryRecipientsWithAction**(collectionId: string,
|
|
3129
|
+
**queryRecipientsWithAction**(collectionId: string,
|
|
3096
3130
|
body: CommsRecipientsWithActionQuery) → `Promise<RecipientId[] | RecipientWithOutcome[]>`
|
|
3097
3131
|
Analytics: Recipients who performed an action, optionally with outcome. POST /admin/collection/:collectionId/comm/query/recipients/with-action
|
|
3098
3132
|
|
|
3099
|
-
**logCommunicationEvent**(collectionId: string,
|
|
3133
|
+
**logCommunicationEvent**(collectionId: string,
|
|
3100
3134
|
body: LogCommunicationEventBody) → `Promise<AppendResult>`
|
|
3101
3135
|
Logging: Append a single communication event. POST /admin/collection/:collectionId/comm/log
|
|
3102
3136
|
|
|
3103
|
-
**logBulkCommunicationEvents**(collectionId: string,
|
|
3137
|
+
**logBulkCommunicationEvents**(collectionId: string,
|
|
3104
3138
|
body: LogBulkCommunicationEventsBody | ({ sourceId: string; ids: string[]; idField?: 'userId'|'contactId'; [k: string]: any }) → `void`
|
|
3105
3139
|
Logging: Append many communication events for a list of IDs. POST /admin/collection/:collectionId/comm/log/bulk
|
|
3106
3140
|
|
|
@@ -3108,31 +3142,31 @@ Logging: Append many communication events for a list of IDs. POST /admin/collect
|
|
|
3108
3142
|
|
|
3109
3143
|
**create**(collectionId: string, data: ContactCreateRequest) → `Promise<ContactResponse>`
|
|
3110
3144
|
|
|
3111
|
-
**list**(collectionId: string,
|
|
3145
|
+
**list**(collectionId: string,
|
|
3112
3146
|
params?: { limit?: number; offset?: number; includeDeleted?: boolean }) → `Promise<ContactListResponse>`
|
|
3113
3147
|
|
|
3114
|
-
**get**(collectionId: string,
|
|
3115
|
-
contactId: string,
|
|
3148
|
+
**get**(collectionId: string,
|
|
3149
|
+
contactId: string,
|
|
3116
3150
|
params?: { includeDeleted?: boolean }) → `Promise<ContactResponse>`
|
|
3117
3151
|
|
|
3118
|
-
**update**(collectionId: string,
|
|
3119
|
-
contactId: string,
|
|
3152
|
+
**update**(collectionId: string,
|
|
3153
|
+
contactId: string,
|
|
3120
3154
|
data: ContactUpdateRequest) → `Promise<ContactResponse>`
|
|
3121
3155
|
|
|
3122
3156
|
**remove**(collectionId: string, contactId: string) → `Promise<void>`
|
|
3123
3157
|
|
|
3124
|
-
**lookup**(collectionId: string,
|
|
3158
|
+
**lookup**(collectionId: string,
|
|
3125
3159
|
params: { email?: string; phone?: string }) → `Promise<ContactResponse>`
|
|
3126
3160
|
|
|
3127
|
-
**upsert**(collectionId: string,
|
|
3161
|
+
**upsert**(collectionId: string,
|
|
3128
3162
|
data: ContactCreateRequest) → `Promise<ContactResponse>`
|
|
3129
3163
|
|
|
3130
|
-
**publicUpsert**(collectionId: string,
|
|
3164
|
+
**publicUpsert**(collectionId: string,
|
|
3131
3165
|
data: PublicContactUpsertRequest) → `Promise<PublicContactUpsertResponse>`
|
|
3132
3166
|
|
|
3133
3167
|
**publicGetMine**(collectionId: string) → `Promise<PublicGetMyContactResponse>`
|
|
3134
3168
|
|
|
3135
|
-
**publicUpdateMine**(collectionId: string,
|
|
3169
|
+
**publicUpdateMine**(collectionId: string,
|
|
3136
3170
|
data: ContactPatch) → `Promise<PublicUpdateMyContactResponse>`
|
|
3137
3171
|
|
|
3138
3172
|
**publicGetSchema**(collectionId: string) → `Promise<ContactSchema>`
|
|
@@ -3141,7 +3175,7 @@ Public: Get contact update schema for a collection Fetches the public contact sc
|
|
|
3141
3175
|
**erase**(collectionId: string, contactId: string, body?: any) → `Promise<ContactResponse>`
|
|
3142
3176
|
Public: Get contact update schema for a collection Fetches the public contact schema including core fields, custom fields with conditional visibility rules, and visibility/editability settings. Custom fields may include a `condition` property that specifies when the field should be displayed. Apps rendering these forms should: 1. Evaluate each field's `condition` against current form values 2. Hide fields whose conditions are not met 3. Skip validation for hidden fields (they shouldn't be required when not visible)
|
|
3143
3177
|
|
|
3144
|
-
**getUser**(collectionId: string,
|
|
3178
|
+
**getUser**(collectionId: string,
|
|
3145
3179
|
userId: string,) → `Promise<UserSearchResponse>`
|
|
3146
3180
|
Public: Get contact update schema for a collection Fetches the public contact schema including core fields, custom fields with conditional visibility rules, and visibility/editability settings. Custom fields may include a `condition` property that specifies when the field should be displayed. Apps rendering these forms should: 1. Evaluate each field's `condition` against current form values 2. Hide fields whose conditions are not met 3. Skip validation for hidden fields (they shouldn't be required when not visible)
|
|
3147
3181
|
|
|
@@ -3181,108 +3215,108 @@ Delete a form for a collection (admin only).
|
|
|
3181
3215
|
|
|
3182
3216
|
### interactions
|
|
3183
3217
|
|
|
3184
|
-
**query**(collectionId: string,
|
|
3218
|
+
**query**(collectionId: string,
|
|
3185
3219
|
body: AdminInteractionsQueryRequest) → `Promise<InteractionEventRow[]>`
|
|
3186
3220
|
POST /admin/collection/:collectionId/interactions/query Flexible query for interaction events with optional includes.
|
|
3187
3221
|
|
|
3188
|
-
**countsByOutcome**(collectionId: string,
|
|
3222
|
+
**countsByOutcome**(collectionId: string,
|
|
3189
3223
|
query: AdminInteractionsCountsByOutcomeRequest = {}) → `Promise<OutcomeCount[]>`
|
|
3190
3224
|
POST /admin/collection/:collectionId/interactions/counts-by-outcome Returns array of { outcome, count }.
|
|
3191
3225
|
|
|
3192
|
-
**appendEvent**(collectionId: string,
|
|
3226
|
+
**appendEvent**(collectionId: string,
|
|
3193
3227
|
body: AppendInteractionBody) → `Promise<`
|
|
3194
3228
|
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
3195
3229
|
|
|
3196
|
-
**updateEvent**(collectionId: string,
|
|
3230
|
+
**updateEvent**(collectionId: string,
|
|
3197
3231
|
body: UpdateInteractionBody) → `Promise<`
|
|
3198
3232
|
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
3199
3233
|
|
|
3200
|
-
**submitPublicEvent**(collectionId: string,
|
|
3234
|
+
**submitPublicEvent**(collectionId: string,
|
|
3201
3235
|
body: AppendInteractionBody) → `Promise<`
|
|
3202
3236
|
Appends one interaction event from a public source.
|
|
3203
3237
|
|
|
3204
|
-
**create**(collectionId: string,
|
|
3238
|
+
**create**(collectionId: string,
|
|
3205
3239
|
body: CreateInteractionTypeBody) → `Promise<InteractionTypeRecord>`
|
|
3206
3240
|
Appends one interaction event from a public source.
|
|
3207
3241
|
|
|
3208
|
-
**list**(collectionId: string,
|
|
3242
|
+
**list**(collectionId: string,
|
|
3209
3243
|
query: ListInteractionTypesQuery = {}) → `Promise<InteractionTypeList>`
|
|
3210
3244
|
Appends one interaction event from a public source.
|
|
3211
3245
|
|
|
3212
|
-
**get**(collectionId: string,
|
|
3246
|
+
**get**(collectionId: string,
|
|
3213
3247
|
id: string) → `Promise<InteractionTypeRecord>`
|
|
3214
3248
|
Appends one interaction event from a public source.
|
|
3215
3249
|
|
|
3216
|
-
**update**(collectionId: string,
|
|
3217
|
-
id: string,
|
|
3250
|
+
**update**(collectionId: string,
|
|
3251
|
+
id: string,
|
|
3218
3252
|
patchBody: UpdateInteractionTypeBody) → `Promise<InteractionTypeRecord>`
|
|
3219
3253
|
Appends one interaction event from a public source.
|
|
3220
3254
|
|
|
3221
|
-
**remove**(collectionId: string,
|
|
3255
|
+
**remove**(collectionId: string,
|
|
3222
3256
|
id: string) → `Promise<void>`
|
|
3223
3257
|
Appends one interaction event from a public source.
|
|
3224
3258
|
|
|
3225
|
-
**publicCountsByOutcome**(collectionId: string,
|
|
3226
|
-
body: PublicInteractionsCountsByOutcomeRequest,
|
|
3259
|
+
**publicCountsByOutcome**(collectionId: string,
|
|
3260
|
+
body: PublicInteractionsCountsByOutcomeRequest,
|
|
3227
3261
|
authToken?: string) → `Promise<OutcomeCount[]>`
|
|
3228
3262
|
Appends one interaction event from a public source.
|
|
3229
3263
|
|
|
3230
|
-
**publicMyInteractions**(collectionId: string,
|
|
3231
|
-
body: PublicInteractionsByUserRequest,
|
|
3264
|
+
**publicMyInteractions**(collectionId: string,
|
|
3265
|
+
body: PublicInteractionsByUserRequest,
|
|
3232
3266
|
authToken?: string) → `Promise<InteractionEventRow[]>`
|
|
3233
3267
|
Appends one interaction event from a public source.
|
|
3234
3268
|
|
|
3235
|
-
**publicList**(collectionId: string,
|
|
3269
|
+
**publicList**(collectionId: string,
|
|
3236
3270
|
query: ListInteractionTypesQuery = {}) → `Promise<InteractionTypeList>`
|
|
3237
3271
|
Appends one interaction event from a public source.
|
|
3238
3272
|
|
|
3239
|
-
**publicGet**(collectionId: string,
|
|
3273
|
+
**publicGet**(collectionId: string,
|
|
3240
3274
|
id: string) → `Promise<InteractionTypeRecord>`
|
|
3241
3275
|
Appends one interaction event from a public source.
|
|
3242
3276
|
|
|
3243
3277
|
### jobs
|
|
3244
3278
|
|
|
3245
|
-
**listJobs**(collectionId: string,
|
|
3279
|
+
**listJobs**(collectionId: string,
|
|
3246
3280
|
query: ListJobsQuery = {}) → `Promise<JobsPage>`
|
|
3247
3281
|
List visible jobs for a collection GET /admin/collection/:collectionId/jobs
|
|
3248
3282
|
|
|
3249
|
-
**getJob**(collectionId: string,
|
|
3283
|
+
**getJob**(collectionId: string,
|
|
3250
3284
|
jobId: number) → `Promise<Job>`
|
|
3251
3285
|
Get a single job GET /admin/collection/:collectionId/jobs/:jobId
|
|
3252
3286
|
|
|
3253
3287
|
### journeys
|
|
3254
3288
|
|
|
3255
|
-
**create**(collectionId: string,
|
|
3289
|
+
**create**(collectionId: string,
|
|
3256
3290
|
body: CreateJourneyBody) → `Promise<JourneyRecord>`
|
|
3257
3291
|
|
|
3258
|
-
**list**(collectionId: string,
|
|
3292
|
+
**list**(collectionId: string,
|
|
3259
3293
|
query: ListJourneysQuery = {}) → `Promise<JourneyList>`
|
|
3260
3294
|
|
|
3261
|
-
**get**(collectionId: string,
|
|
3295
|
+
**get**(collectionId: string,
|
|
3262
3296
|
id: string) → `Promise<JourneyRecord>`
|
|
3263
3297
|
|
|
3264
|
-
**update**(collectionId: string,
|
|
3265
|
-
id: string,
|
|
3298
|
+
**update**(collectionId: string,
|
|
3299
|
+
id: string,
|
|
3266
3300
|
body: UpdateJourneyBody) → `Promise<JourneyRecord>`
|
|
3267
3301
|
|
|
3268
|
-
**remove**(collectionId: string,
|
|
3302
|
+
**remove**(collectionId: string,
|
|
3269
3303
|
id: string) → `Promise<void>`
|
|
3270
3304
|
|
|
3271
3305
|
### journeysAnalytics
|
|
3272
3306
|
|
|
3273
|
-
**stats**(collectionId: string,
|
|
3274
|
-
journeyId: string,
|
|
3307
|
+
**stats**(collectionId: string,
|
|
3308
|
+
journeyId: string,
|
|
3275
3309
|
body: JourneyStatsRequest = {}) → `Promise<JourneyStatsResponse>`
|
|
3276
3310
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/stats Computes journey stats over a time window; outcome defaults to 'success'. If `finalStepId` is provided, includes `currentlyActive` and `completed` fields.
|
|
3277
3311
|
|
|
3278
|
-
**recipients**(collectionId: string,
|
|
3279
|
-
journeyId: string,
|
|
3280
|
-
stepId: string,
|
|
3312
|
+
**recipients**(collectionId: string,
|
|
3313
|
+
journeyId: string,
|
|
3314
|
+
stepId: string,
|
|
3281
3315
|
body: JourneyStepRecipientsRequest = {}) → `Promise<JourneyStepRecipientsResponse>`
|
|
3282
3316
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/steps/:stepId/recipients Returns recipient IDs for a given journey step. For completed/pending, `interactionId` is required; outcome defaults to 'success'.
|
|
3283
3317
|
|
|
3284
|
-
**funnelReport**(collectionId: string,
|
|
3285
|
-
journeyId: string,
|
|
3318
|
+
**funnelReport**(collectionId: string,
|
|
3319
|
+
journeyId: string,
|
|
3286
3320
|
body: JourneyFunnelReportRequest) → `Promise<JourneyFunnelReportResponse>`
|
|
3287
3321
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/funnel-report Computes conversion, counts, and avg time across mapped steps in a period.
|
|
3288
3322
|
|
|
@@ -3294,14 +3328,14 @@ Platform: Create a global location (super admin; requires features.adminApps) PO
|
|
|
3294
3328
|
**create**(collectionId: string, params: LocationPayload) → `Promise<Location>`
|
|
3295
3329
|
Admin: Create a collection-scoped location POST /admin/collection/:collectionId/location
|
|
3296
3330
|
|
|
3297
|
-
**search**(collectionId: string,
|
|
3331
|
+
**search**(collectionId: string,
|
|
3298
3332
|
query: LocationSearchQuery = {}) → `Promise<LocationSearchResponse>`
|
|
3299
3333
|
Admin: Search locations to pick during setup (combines collection + global) GET /admin/collection/:collectionId/location/search
|
|
3300
3334
|
|
|
3301
3335
|
**getPublic**(locationId: string) → `Promise<Location>`
|
|
3302
3336
|
Public: Fetch a global location by ID GET /public/location/:locationId
|
|
3303
3337
|
|
|
3304
|
-
**getPublicForCollection**(collectionId: string,
|
|
3338
|
+
**getPublicForCollection**(collectionId: string,
|
|
3305
3339
|
locationId: string) → `Promise<Location>`
|
|
3306
3340
|
Public: Fetch a location for a collection; returns either a collection-owned or global fallback GET /public/collection/:collectionId/location/:locationId
|
|
3307
3341
|
|
|
@@ -3318,38 +3352,38 @@ Lookup a tag by its ID (public). GET /public/nfc/findByTag/:tagId
|
|
|
3318
3352
|
|
|
3319
3353
|
### order
|
|
3320
3354
|
|
|
3321
|
-
**create**(collectionId: string,
|
|
3355
|
+
**create**(collectionId: string,
|
|
3322
3356
|
data: CreateOrderRequest) → `Promise<CreateOrderResponse>`
|
|
3323
3357
|
Create a new order with items. ```typescript const order = await order.create('coll_123', { orderRef: 'ORD-12345', customerId: 'CUST-789', items: [ { itemType: 'tag', itemId: 'TAG001' }, { itemType: 'tag', itemId: 'TAG002' }, { itemType: 'serial', itemId: 'SN12345' } ], status: 'pending', metadata: { shipmentId: 'SHIP-789', destination: 'Warehouse B' } }) ```
|
|
3324
3358
|
|
|
3325
|
-
**get**(collectionId: string,
|
|
3359
|
+
**get**(collectionId: string,
|
|
3326
3360
|
orderId: string) → `Promise<GetOrderResponse>`
|
|
3327
3361
|
Get a single order by ID with all its items. ```typescript const order = await order.get('coll_123', 'order_abc123') console.log(`Order has ${order.itemCount} items`) ```
|
|
3328
3362
|
|
|
3329
|
-
**update**(collectionId: string,
|
|
3330
|
-
orderId: string,
|
|
3363
|
+
**update**(collectionId: string,
|
|
3364
|
+
orderId: string,
|
|
3331
3365
|
data: UpdateOrderRequest) → `Promise<UpdateOrderResponse>`
|
|
3332
3366
|
Update order status or metadata. Items are managed separately via addItems/removeItems. ```typescript const updated = await order.update('coll_123', 'order_abc123', { status: 'shipped', metadata: { trackingNumber: '1Z999AA10123456784', shippedAt: '2026-02-02T14:30:00Z' } }) ```
|
|
3333
3367
|
|
|
3334
|
-
**remove**(collectionId: string,
|
|
3368
|
+
**remove**(collectionId: string,
|
|
3335
3369
|
orderId: string) → `Promise<DeleteOrderResponse>`
|
|
3336
3370
|
Delete an order and all its items (cascade delete). ```typescript await order.remove('coll_123', 'order_abc123') ```
|
|
3337
3371
|
|
|
3338
|
-
**list**(collectionId: string,
|
|
3372
|
+
**list**(collectionId: string,
|
|
3339
3373
|
params?: ListOrdersRequest) → `Promise<ListOrdersResponse>`
|
|
3340
3374
|
List orders for a collection with optional filters and pagination. Orders are returned in descending order by createdAt (newest first). ```typescript // List all orders const all = await order.list('coll_123') // List with filters const pending = await order.list('coll_123', { status: 'pending', limit: 50, offset: 0 }) // Filter by customer const customerOrders = await order.list('coll_123', { customerId: 'CUST-789' }) ```
|
|
3341
3375
|
|
|
3342
|
-
**addItems**(collectionId: string,
|
|
3343
|
-
orderId: string,
|
|
3376
|
+
**addItems**(collectionId: string,
|
|
3377
|
+
orderId: string,
|
|
3344
3378
|
data: AddItemsRequest) → `Promise<AddItemsResponse>`
|
|
3345
3379
|
Add additional items to an existing order. ```typescript const updated = await order.addItems('coll_123', 'order_abc123', { items: [ { itemType: 'tag', itemId: 'TAG003' }, { itemType: 'proof', itemId: 'proof_xyz' } ] }) console.log(`Order now has ${updated.itemCount} items`) ```
|
|
3346
3380
|
|
|
3347
|
-
**removeItems**(collectionId: string,
|
|
3348
|
-
orderId: string,
|
|
3381
|
+
**removeItems**(collectionId: string,
|
|
3382
|
+
orderId: string,
|
|
3349
3383
|
data: RemoveItemsRequest) → `Promise<RemoveItemsResponse>`
|
|
3350
3384
|
Remove specific items from an order. ```typescript const updated = await order.removeItems('coll_123', 'order_abc123', { itemIds: ['item_001', 'item_002'] }) ```
|
|
3351
3385
|
|
|
3352
|
-
**lookup**(collectionId: string,
|
|
3386
|
+
**lookup**(collectionId: string,
|
|
3353
3387
|
data: LookupOrdersRequest) → `Promise<LookupOrdersResponse>`
|
|
3354
3388
|
Find all orders containing specific items (tags, proofs, or serial numbers). Use case: Scan a tag and immediately see if it's part of any order. ```typescript // Scan a tag and find associated orders const result = await order.lookup('coll_123', { items: [ { itemType: 'tag', itemId: 'TAG001' } ] }) if (result.orders.length > 0) { console.log(`Tag is part of ${result.orders.length} order(s)`) result.orders.forEach(ord => { console.log(`Order ${ord.orderRef}: ${ord.status}`) }) } // Batch lookup multiple items const batchResult = await order.lookup('coll_123', { items: [ { itemType: 'tag', itemId: 'TAG001' }, { itemType: 'serial', itemId: 'SN12345' }, { itemType: 'proof', itemId: 'proof_xyz' } ] }) ```
|
|
3355
3389
|
|
|
@@ -3456,69 +3490,79 @@ Get an Ably token for admin real-time communication. This endpoint returns an Ab
|
|
|
3456
3490
|
|
|
3457
3491
|
### segments
|
|
3458
3492
|
|
|
3459
|
-
**create**(collectionId: string,
|
|
3493
|
+
**create**(collectionId: string,
|
|
3460
3494
|
body: Omit<SegmentRecord, 'id' | 'collectionId' | 'createdAt'>) → `Promise<SegmentRecord>`
|
|
3461
3495
|
|
|
3462
|
-
**list**(collectionId: string,
|
|
3496
|
+
**list**(collectionId: string,
|
|
3463
3497
|
query: ListSegmentsQuery = {}) → `Promise<SegmentList>`
|
|
3464
3498
|
|
|
3465
|
-
**get**(collectionId: string,
|
|
3499
|
+
**get**(collectionId: string,
|
|
3466
3500
|
id: string) → `Promise<SegmentRecord>`
|
|
3467
3501
|
|
|
3468
|
-
**update**(collectionId: string,
|
|
3469
|
-
id: string,
|
|
3502
|
+
**update**(collectionId: string,
|
|
3503
|
+
id: string,
|
|
3470
3504
|
body: Partial<Omit<SegmentRecord, 'id' | 'collectionId' | 'createdAt'>>) → `Promise<SegmentRecord>`
|
|
3471
3505
|
|
|
3472
|
-
**remove**(collectionId: string,
|
|
3506
|
+
**remove**(collectionId: string,
|
|
3473
3507
|
id: string) → `Promise<void>`
|
|
3474
3508
|
|
|
3475
|
-
**calculate**(collectionId: string,
|
|
3509
|
+
**calculate**(collectionId: string,
|
|
3476
3510
|
id: string) → `Promise<SegmentCalculateResult>`
|
|
3477
3511
|
|
|
3478
|
-
**recipients**(collectionId: string,
|
|
3479
|
-
id: string,
|
|
3512
|
+
**recipients**(collectionId: string,
|
|
3513
|
+
id: string,
|
|
3480
3514
|
query: { limit?: number; offset?: number } = {}) → `Promise<SegmentRecipientsResponse>`
|
|
3481
3515
|
|
|
3482
3516
|
### tags
|
|
3483
3517
|
|
|
3484
|
-
**create**(collectionId: string,
|
|
3518
|
+
**create**(collectionId: string,
|
|
3485
3519
|
data: CreateTagRequest) → `Promise<CreateTagResponse>`
|
|
3486
3520
|
Create a single tag mapping. If proofId is not provided, automatically generates a serial number. ```typescript // Auto-generate serial number const tag = await tags.create('coll_123', { tagId: 'TAG001', productId: 'prod_456', variantId: 'var_789' }) // Use explicit proof ID const tag2 = await tags.create('coll_123', { tagId: 'TAG002', productId: 'prod_456', proofId: 'proof_explicit_123' }) ```
|
|
3487
3521
|
|
|
3488
|
-
**createBatch**(collectionId: string,
|
|
3522
|
+
**createBatch**(collectionId: string,
|
|
3489
3523
|
data: CreateTagsBatchRequest) → `Promise<CreateTagsBatchResponse>`
|
|
3490
3524
|
Create multiple tag mappings efficiently in a batch operation. By default, auto-generates serial numbers for all tags without explicit proofId. Tags are grouped by product/variant/batch and serial numbers are generated in a single transaction per group for optimal performance. ```typescript const result = await tags.createBatch('coll_123', { tags: [ { tagId: 'TAG001', productId: 'prod_456', variantId: 'var_789' }, { tagId: 'TAG002', productId: 'prod_456', variantId: 'var_789' }, { tagId: 'TAG003', productId: 'prod_456', batchId: 'batch_100' } ] }) console.log(`Created: ${result.summary.created}, Failed: ${result.summary.failed}`) ```
|
|
3491
3525
|
|
|
3492
|
-
**update**(collectionId: string,
|
|
3493
|
-
tagId: string,
|
|
3526
|
+
**update**(collectionId: string,
|
|
3527
|
+
tagId: string,
|
|
3494
3528
|
data: UpdateTagRequest) → `Promise<UpdateTagResponse>`
|
|
3495
3529
|
Update an existing tag mapping. ```typescript const updated = await tags.update('coll_123', 'TAG001', { variantId: 'var_999', metadata: { notes: 'Updated variant' } }) ```
|
|
3496
3530
|
|
|
3497
|
-
**remove**(collectionId: string,
|
|
3531
|
+
**remove**(collectionId: string,
|
|
3498
3532
|
tagId: string) → `Promise<DeleteTagResponse>`
|
|
3499
3533
|
Delete a tag mapping. ```typescript await tags.remove('coll_123', 'TAG001') ```
|
|
3500
3534
|
|
|
3501
|
-
**get**(collectionId: string,
|
|
3535
|
+
**get**(collectionId: string,
|
|
3502
3536
|
tagId: string) → `Promise<GetTagResponse>`
|
|
3503
3537
|
Get a single tag mapping by tagId. ```typescript const tag = await tags.get('coll_123', 'TAG001') ```
|
|
3504
3538
|
|
|
3505
|
-
**list**(collectionId: string,
|
|
3539
|
+
**list**(collectionId: string,
|
|
3506
3540
|
params?: ListTagsRequest) → `Promise<ListTagsResponse>`
|
|
3507
3541
|
List all tags for a collection with optional filters and pagination. ```typescript // List all tags const all = await tags.list('coll_123') // List with filters const filtered = await tags.list('coll_123', { productId: 'prod_456', variantId: 'var_789', limit: 50, offset: 0 }) ```
|
|
3508
3542
|
|
|
3509
|
-
**
|
|
3510
|
-
tagId: string,
|
|
3543
|
+
**getTag**(tagId: string,
|
|
3511
3544
|
params?: PublicGetTagRequest) → `Promise<PublicGetTagResponse>`
|
|
3512
|
-
Public lookup of a single tag by tagId
|
|
3545
|
+
Public lookup of a single tag by tagId (global). Optionally embed related collection, product, or proof data. No authentication required. ```typescript // Simple lookup const result = await tags.getTag('TAG001') // With embedded data const withData = await tags.getTag('TAG001', { embed: 'collection,product,proof' }) console.log(withData.tag, withData.collection, withData.product, withData.proof) ```
|
|
3513
3546
|
|
|
3514
|
-
**
|
|
3515
|
-
|
|
3547
|
+
**publicGet**(_collectionId: string,
|
|
3548
|
+
tagId: string,
|
|
3549
|
+
params?: PublicGetTagRequest) → `Promise<PublicGetTagResponse>`
|
|
3550
|
+
Backward-compat: Public lookup with collectionId parameter (ignored). Calls global route under /public/tags/:tagId.
|
|
3551
|
+
|
|
3552
|
+
**lookupTags**(data: PublicBatchLookupRequest) → `Promise<PublicBatchLookupResponse>`
|
|
3516
3553
|
Public batch lookup of multiple tags in a single request (POST). Only returns tags from the specified collection. Optionally embed related data. Related data is deduplicated and batch-fetched. No authentication required. ```typescript const result = await tags.publicBatchLookup('coll_123', { tagIds: ['TAG001', 'TAG002', 'TAG003'], embed: 'collection,product' }) // Access tags and deduplicated collections/products console.log(result.tags['TAG001']) console.log(result.collections) console.log(result.products) ```
|
|
3517
3554
|
|
|
3518
|
-
**
|
|
3519
|
-
|
|
3555
|
+
**publicBatchLookup**(_collectionId: string,
|
|
3556
|
+
data: PublicBatchLookupRequest) → `Promise<PublicBatchLookupResponse>`
|
|
3557
|
+
Backward-compat: Public batch lookup with collectionId parameter (ignored). Calls global route under /public/tags/lookup.
|
|
3558
|
+
|
|
3559
|
+
**lookupTagsQuery**(params: PublicBatchLookupQueryRequest) → `Promise<PublicBatchLookupQueryResponse>`
|
|
3520
3560
|
Public batch lookup of multiple tags using query parameters (GET). Only returns tags from the specified collection. Alternative to publicBatchLookup for simple GET requests. No authentication required. ```typescript const result = await tags.publicBatchLookupQuery('coll_123', { tagIds: 'TAG001,TAG002,TAG003', embed: 'collection' }) ```
|
|
3521
3561
|
|
|
3562
|
+
**publicBatchLookupQuery**(_collectionId: string,
|
|
3563
|
+
params: PublicBatchLookupQueryRequest) → `Promise<PublicBatchLookupQueryResponse>`
|
|
3564
|
+
Backward-compat: Public batch lookup (GET) with collectionId parameter (ignored). Calls global route under /public/tags/lookup.
|
|
3565
|
+
|
|
3522
3566
|
### template
|
|
3523
3567
|
|
|
3524
3568
|
**getAll**(collectionId: string) → `Promise<Template[]>`
|
|
@@ -3527,14 +3571,14 @@ Public batch lookup of multiple tags using query parameters (GET). Only returns
|
|
|
3527
3571
|
|
|
3528
3572
|
**create**(collectionId: string, data: TemplateInput) → `Promise<Template>`
|
|
3529
3573
|
|
|
3530
|
-
**update**(collectionId: string,
|
|
3531
|
-
templateId: string,
|
|
3574
|
+
**update**(collectionId: string,
|
|
3575
|
+
templateId: string,
|
|
3532
3576
|
data: TemplateUpdate) → `Promise<Template>`
|
|
3533
3577
|
|
|
3534
3578
|
**del**(collectionId: string, templateId: string) → `Promise<Template>`
|
|
3535
3579
|
|
|
3536
|
-
**uploadAsset**(collectionId: string,
|
|
3537
|
-
templateId: string,
|
|
3580
|
+
**uploadAsset**(collectionId: string,
|
|
3581
|
+
templateId: string,
|
|
3538
3582
|
file: File | Blob) → `Promise<`
|
|
3539
3583
|
|
|
3540
3584
|
**getAllowed**(collectionId: string) → `Promise<TemplatePublic[]>`
|
|
@@ -3545,55 +3589,55 @@ Public batch lookup of multiple tags using query parameters (GET). Only returns
|
|
|
3545
3589
|
|
|
3546
3590
|
**getAllowedGlobal**(collectionId: string) → `Promise<TemplatePublic[]>`
|
|
3547
3591
|
|
|
3548
|
-
**render**(collectionId: string,
|
|
3549
|
-
templateId: string,
|
|
3592
|
+
**render**(collectionId: string,
|
|
3593
|
+
templateId: string,
|
|
3550
3594
|
body: TemplateRenderRequest) → `Promise<TemplateRenderResponse>`
|
|
3551
3595
|
|
|
3552
|
-
**renderSource**(collectionId: string,
|
|
3596
|
+
**renderSource**(collectionId: string,
|
|
3553
3597
|
body: TemplateRenderSourceRequest) → `Promise<TemplateRenderSourceResponse>`
|
|
3554
3598
|
|
|
3555
3599
|
### variant
|
|
3556
3600
|
|
|
3557
|
-
**get**(collectionId: string,
|
|
3558
|
-
productId: string,
|
|
3601
|
+
**get**(collectionId: string,
|
|
3602
|
+
productId: string,
|
|
3559
3603
|
variantId: string) → `Promise<VariantResponse>`
|
|
3560
3604
|
Get a single variant by ID for a collection and product (admin only).
|
|
3561
3605
|
|
|
3562
|
-
**list**(collectionId: string,
|
|
3606
|
+
**list**(collectionId: string,
|
|
3563
3607
|
productId: string) → `Promise<VariantResponse[]>`
|
|
3564
3608
|
List all variants for a collection and product (admin only).
|
|
3565
3609
|
|
|
3566
|
-
**create**(collectionId: string,
|
|
3567
|
-
productId: string,
|
|
3610
|
+
**create**(collectionId: string,
|
|
3611
|
+
productId: string,
|
|
3568
3612
|
data: VariantCreateRequest) → `Promise<VariantResponse>`
|
|
3569
3613
|
Create a new variant for a collection and product (admin only).
|
|
3570
3614
|
|
|
3571
|
-
**update**(collectionId: string,
|
|
3572
|
-
productId: string,
|
|
3573
|
-
variantId: string,
|
|
3615
|
+
**update**(collectionId: string,
|
|
3616
|
+
productId: string,
|
|
3617
|
+
variantId: string,
|
|
3574
3618
|
data: VariantUpdateRequest) → `Promise<VariantResponse>`
|
|
3575
3619
|
Update a variant for a collection and product (admin only).
|
|
3576
3620
|
|
|
3577
|
-
**remove**(collectionId: string,
|
|
3578
|
-
productId: string,
|
|
3621
|
+
**remove**(collectionId: string,
|
|
3622
|
+
productId: string,
|
|
3579
3623
|
variantId: string) → `Promise<void>`
|
|
3580
3624
|
Delete a variant for a collection and product (admin only).
|
|
3581
3625
|
|
|
3582
|
-
**getPublic**(collectionId: string,
|
|
3583
|
-
productId: string,
|
|
3626
|
+
**getPublic**(collectionId: string,
|
|
3627
|
+
productId: string,
|
|
3584
3628
|
variantId: string) → `Promise<VariantResponse>`
|
|
3585
3629
|
Get a single variant by ID for a collection and product (public endpoint).
|
|
3586
3630
|
|
|
3587
|
-
**getSN**(collectionId: string,
|
|
3588
|
-
productId: string,
|
|
3589
|
-
variantId: string,
|
|
3590
|
-
startIndex: number = 0,
|
|
3631
|
+
**getSN**(collectionId: string,
|
|
3632
|
+
productId: string,
|
|
3633
|
+
variantId: string,
|
|
3634
|
+
startIndex: number = 0,
|
|
3591
3635
|
count: number = 10) → `Promise<any>`
|
|
3592
3636
|
Get serial numbers for a variant (admin only).
|
|
3593
3637
|
|
|
3594
|
-
**lookupSN**(collectionId: string,
|
|
3595
|
-
productId: string,
|
|
3596
|
-
variantId: string,
|
|
3638
|
+
**lookupSN**(collectionId: string,
|
|
3639
|
+
productId: string,
|
|
3640
|
+
variantId: string,
|
|
3597
3641
|
codeId: string) → `Promise<any>`
|
|
3598
3642
|
Look up a serial number by code for a variant (admin only).
|
|
3599
3643
|
|
|
@@ -66,3 +66,45 @@ export interface Collection {
|
|
|
66
66
|
export type CollectionResponse = Collection;
|
|
67
67
|
export type CollectionCreateRequest = Omit<Collection, 'id' | 'shortId'>;
|
|
68
68
|
export type CollectionUpdateRequest = Partial<Omit<Collection, 'id' | 'shortId'>>;
|
|
69
|
+
/**
|
|
70
|
+
* Configuration for an app module within a collection.
|
|
71
|
+
*/
|
|
72
|
+
export interface AppConfig {
|
|
73
|
+
/** Unique identifier for the app */
|
|
74
|
+
id: string;
|
|
75
|
+
/** Underling app module id */
|
|
76
|
+
srcAppId: string;
|
|
77
|
+
/** Display name of the app */
|
|
78
|
+
name: string;
|
|
79
|
+
/** Optional description of the app */
|
|
80
|
+
description?: string;
|
|
81
|
+
/** Optional icon for the app */
|
|
82
|
+
faIcon?: string;
|
|
83
|
+
/** app category */
|
|
84
|
+
category: "Authenticity" | "Documentation" | "Commerce" | "Engagement" | "AI" | "Digital Product Passports" | "Integration" | "Web3" | "Other";
|
|
85
|
+
/** Whether the app is enabled for this collection */
|
|
86
|
+
active?: boolean;
|
|
87
|
+
/** Whether the app is only accessible to owners */
|
|
88
|
+
ownersOnly?: boolean;
|
|
89
|
+
/** Whether the app is hidden in the UI */
|
|
90
|
+
hidden?: boolean;
|
|
91
|
+
/** Universal iframe URL for external embedding */
|
|
92
|
+
publicIframeUrl?: string;
|
|
93
|
+
/** supports multiple pages / deep links into the app */
|
|
94
|
+
supportsDeepLinks?: boolean;
|
|
95
|
+
/** App component configuration */
|
|
96
|
+
usage: {
|
|
97
|
+
collection: boolean;
|
|
98
|
+
product: boolean;
|
|
99
|
+
proof: boolean;
|
|
100
|
+
widget: boolean;
|
|
101
|
+
};
|
|
102
|
+
[key: string]: any;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Response containing app configurations for a collection.
|
|
106
|
+
*/
|
|
107
|
+
export interface AppsConfigResponse {
|
|
108
|
+
/** Array of app configurations */
|
|
109
|
+
apps: AppConfig[];
|
|
110
|
+
}
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8 | Generated: 2026-02-05T19:14:34.871Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -856,6 +856,37 @@ interface Collection {
|
|
|
856
856
|
}
|
|
857
857
|
```
|
|
858
858
|
|
|
859
|
+
**AppConfig** (interface)
|
|
860
|
+
```typescript
|
|
861
|
+
interface AppConfig {
|
|
862
|
+
id: string
|
|
863
|
+
srcAppId: string
|
|
864
|
+
name: string
|
|
865
|
+
description?: string
|
|
866
|
+
faIcon?: string
|
|
867
|
+
category: "Authenticity" | "Documentation" | "Commerce" | "Engagement" | "AI" | "Digital Product Passports" | "Integration" | "Web3" | "Other";
|
|
868
|
+
active?: boolean
|
|
869
|
+
ownersOnly?: boolean
|
|
870
|
+
hidden?: boolean
|
|
871
|
+
publicIframeUrl?: string
|
|
872
|
+
supportsDeepLinks?: boolean;
|
|
873
|
+
usage: {
|
|
874
|
+
collection: boolean; // use at the collecton level
|
|
875
|
+
product: boolean; // use at the product level
|
|
876
|
+
proof: boolean; // use at the proof level
|
|
877
|
+
widget: boolean; // has a widget component available
|
|
878
|
+
}
|
|
879
|
+
[key: string]: any
|
|
880
|
+
}
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
**AppsConfigResponse** (interface)
|
|
884
|
+
```typescript
|
|
885
|
+
interface AppsConfigResponse {
|
|
886
|
+
apps: AppConfig[]
|
|
887
|
+
}
|
|
888
|
+
```
|
|
889
|
+
|
|
859
890
|
**CollectionResponse** = `Collection`
|
|
860
891
|
|
|
861
892
|
**CollectionCreateRequest** = `Omit<Collection, 'id' | 'shortId'>`
|
|
@@ -2998,6 +3029,9 @@ Retrieve a collection by its shortId (public endpoint).
|
|
|
2998
3029
|
**getSettings**(collectionId: string, settingGroup: string, admin?: boolean) → `Promise<any>`
|
|
2999
3030
|
Retrieve a specific settings group for a collection (public endpoint).
|
|
3000
3031
|
|
|
3032
|
+
**getAppsConfig**(collectionId: string) → `Promise<AppsConfigResponse>`
|
|
3033
|
+
Retrieve all configured app module definitions for a collection (public endpoint).
|
|
3034
|
+
|
|
3001
3035
|
**updateSettings**(collectionId: string, settingGroup: string, settings: any) → `Promise<any>`
|
|
3002
3036
|
Update a specific settings group for a collection (admin endpoint).
|
|
3003
3037
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proveanything/smartlinks",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "tsc && node scripts/copy-docs-to-dist.js",
|
|
13
|
+
"build": "tsc && node generate-api-summary.js && node scripts/copy-docs-to-dist.js",
|
|
14
14
|
"docs": "typedoc",
|
|
15
15
|
"docs:summary": "node generate-api-summary.js",
|
|
16
16
|
"build:docs": "tsc build-docs.ts --outDir dist && node dist/build-docs.js",
|
|
17
|
-
"prepublishOnly": "npm run build
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"smartlinks",
|