@proofchain/sdk 2.6.0 → 2.8.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/dist/index.d.mts +39 -27
- package/dist/index.d.ts +39 -27
- package/dist/index.js +24 -39
- package/dist/index.mjs +24 -39
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1582,61 +1582,49 @@ declare class EndUsersClient {
|
|
|
1582
1582
|
*/
|
|
1583
1583
|
list(options?: ListEndUsersOptions): Promise<EndUserListResponse>;
|
|
1584
1584
|
/**
|
|
1585
|
-
* Get an end-user by ID
|
|
1585
|
+
* Get an end-user by external ID
|
|
1586
1586
|
*/
|
|
1587
|
-
get(
|
|
1587
|
+
get(externalId: string): Promise<EndUser>;
|
|
1588
1588
|
/**
|
|
1589
|
-
* Get an end-user by
|
|
1589
|
+
* Get an end-user by internal UUID (admin use)
|
|
1590
1590
|
*/
|
|
1591
|
-
|
|
1591
|
+
getByInternalId(userId: string): Promise<EndUser>;
|
|
1592
1592
|
/**
|
|
1593
1593
|
* Create an end-user manually
|
|
1594
1594
|
*/
|
|
1595
1595
|
create(data: CreateEndUserRequest): Promise<EndUser>;
|
|
1596
1596
|
/**
|
|
1597
|
-
* Update an end-user profile
|
|
1597
|
+
* Update an end-user profile by external ID
|
|
1598
1598
|
*/
|
|
1599
|
-
update(
|
|
1599
|
+
update(externalId: string, data: UpdateEndUserRequest): Promise<EndUser>;
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Delete an end-user
|
|
1602
1602
|
*/
|
|
1603
1603
|
delete(userId: string): Promise<void>;
|
|
1604
1604
|
/**
|
|
1605
|
-
* Link a wallet to an end-user
|
|
1606
|
-
*/
|
|
1607
|
-
linkWallet(userId: string, request: LinkWalletRequest): Promise<EndUser>;
|
|
1608
|
-
/**
|
|
1609
|
-
* Unlink wallet from an end-user
|
|
1605
|
+
* Link a wallet to an end-user by external ID
|
|
1610
1606
|
*/
|
|
1611
|
-
|
|
1607
|
+
linkWallet(externalId: string, request: LinkWalletRequest): Promise<EndUser>;
|
|
1612
1608
|
/**
|
|
1613
|
-
* Get user activity/events
|
|
1609
|
+
* Get user activity/events by external ID
|
|
1614
1610
|
*/
|
|
1615
|
-
getActivity(
|
|
1611
|
+
getActivity(externalId: string, options?: {
|
|
1616
1612
|
page?: number;
|
|
1617
1613
|
page_size?: number;
|
|
1618
1614
|
event_type?: string;
|
|
1619
1615
|
}): Promise<UserActivityResponse>;
|
|
1620
1616
|
/**
|
|
1621
|
-
* Add points to a user
|
|
1622
|
-
*/
|
|
1623
|
-
addPoints(userId: string, points: number, reason?: string): Promise<EndUser>;
|
|
1624
|
-
/**
|
|
1625
|
-
* Add a segment to a user
|
|
1617
|
+
* Add points to a user by external ID
|
|
1626
1618
|
*/
|
|
1627
|
-
|
|
1628
|
-
/**
|
|
1629
|
-
* Remove a segment from a user
|
|
1630
|
-
*/
|
|
1631
|
-
removeSegment(userId: string, segment: string): Promise<EndUser>;
|
|
1619
|
+
addPoints(externalId: string, points: number, reason?: string): Promise<EndUser>;
|
|
1632
1620
|
/**
|
|
1633
1621
|
* Merge two users (moves all data from source to target)
|
|
1634
1622
|
*/
|
|
1635
1623
|
merge(request: MergeUsersRequest): Promise<EndUser>;
|
|
1636
1624
|
/**
|
|
1637
|
-
* Update user attributes (convenience method)
|
|
1625
|
+
* Update user attributes (convenience method) by external ID
|
|
1638
1626
|
*/
|
|
1639
|
-
updateAttributes(
|
|
1627
|
+
updateAttributes(externalId: string, attributes: Record<string, any>): Promise<EndUser>;
|
|
1640
1628
|
/**
|
|
1641
1629
|
* Export users as CSV
|
|
1642
1630
|
*/
|
|
@@ -2465,6 +2453,17 @@ declare class DataViewsClient {
|
|
|
2465
2453
|
* Manage cohort definitions, scoring, and filtered leaderboards with percentiles.
|
|
2466
2454
|
*/
|
|
2467
2455
|
|
|
2456
|
+
interface LeaderboardUserProfile$1 {
|
|
2457
|
+
external_id: string;
|
|
2458
|
+
display_name: string | null;
|
|
2459
|
+
first_name: string | null;
|
|
2460
|
+
last_name: string | null;
|
|
2461
|
+
email: string | null;
|
|
2462
|
+
avatar_url: string | null;
|
|
2463
|
+
country: string | null;
|
|
2464
|
+
city: string | null;
|
|
2465
|
+
attributes: Record<string, unknown>;
|
|
2466
|
+
}
|
|
2468
2467
|
interface CohortLeaderboardEntry {
|
|
2469
2468
|
rank: number;
|
|
2470
2469
|
user_id: string;
|
|
@@ -2472,6 +2471,7 @@ interface CohortLeaderboardEntry {
|
|
|
2472
2471
|
percentile_global: number;
|
|
2473
2472
|
percentile_filtered: number | null;
|
|
2474
2473
|
computed_at?: string;
|
|
2474
|
+
user?: LeaderboardUserProfile$1 | null;
|
|
2475
2475
|
}
|
|
2476
2476
|
interface CohortGroupStats {
|
|
2477
2477
|
filtered_avg_percentile: number | null;
|
|
@@ -2562,6 +2562,17 @@ declare class CohortLeaderboardClient {
|
|
|
2562
2562
|
* Manage fanpass composite scores and filtered leaderboards.
|
|
2563
2563
|
*/
|
|
2564
2564
|
|
|
2565
|
+
interface LeaderboardUserProfile {
|
|
2566
|
+
external_id: string;
|
|
2567
|
+
display_name: string | null;
|
|
2568
|
+
first_name: string | null;
|
|
2569
|
+
last_name: string | null;
|
|
2570
|
+
email: string | null;
|
|
2571
|
+
avatar_url: string | null;
|
|
2572
|
+
country: string | null;
|
|
2573
|
+
city: string | null;
|
|
2574
|
+
attributes: Record<string, unknown>;
|
|
2575
|
+
}
|
|
2565
2576
|
interface FanpassLeaderboardEntry {
|
|
2566
2577
|
rank: number;
|
|
2567
2578
|
user_id: string;
|
|
@@ -2570,6 +2581,7 @@ interface FanpassLeaderboardEntry {
|
|
|
2570
2581
|
raw_score: number;
|
|
2571
2582
|
percentile: number;
|
|
2572
2583
|
computed_at?: string;
|
|
2584
|
+
user?: LeaderboardUserProfile | null;
|
|
2573
2585
|
}
|
|
2574
2586
|
interface FanpassGroupStats {
|
|
2575
2587
|
avg_fan_score: number;
|
|
@@ -2954,4 +2966,4 @@ declare class TimeoutError extends ProofChainError {
|
|
|
2954
2966
|
constructor(message?: string);
|
|
2955
2967
|
}
|
|
2956
2968
|
|
|
2957
|
-
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest, type CreateWebhookRequest, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type NFT, NetworkError, NotFoundError, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RewardAsset, type RewardDefinition, type RewardEarned, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type Settlement, type StepCompletionResult, type StepProgress, type StreamAck, type StreamEventRequest, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserQuestProgress, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletStats, type Webhook, WebhooksResource };
|
|
2969
|
+
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest, type CreateWebhookRequest, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type LeaderboardUserProfile$1 as LeaderboardUserProfile, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type NFT, NetworkError, NotFoundError, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RewardAsset, type RewardDefinition, type RewardEarned, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type Settlement, type StepCompletionResult, type StepProgress, type StreamAck, type StreamEventRequest, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserQuestProgress, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletStats, type Webhook, WebhooksResource };
|
package/dist/index.d.ts
CHANGED
|
@@ -1582,61 +1582,49 @@ declare class EndUsersClient {
|
|
|
1582
1582
|
*/
|
|
1583
1583
|
list(options?: ListEndUsersOptions): Promise<EndUserListResponse>;
|
|
1584
1584
|
/**
|
|
1585
|
-
* Get an end-user by ID
|
|
1585
|
+
* Get an end-user by external ID
|
|
1586
1586
|
*/
|
|
1587
|
-
get(
|
|
1587
|
+
get(externalId: string): Promise<EndUser>;
|
|
1588
1588
|
/**
|
|
1589
|
-
* Get an end-user by
|
|
1589
|
+
* Get an end-user by internal UUID (admin use)
|
|
1590
1590
|
*/
|
|
1591
|
-
|
|
1591
|
+
getByInternalId(userId: string): Promise<EndUser>;
|
|
1592
1592
|
/**
|
|
1593
1593
|
* Create an end-user manually
|
|
1594
1594
|
*/
|
|
1595
1595
|
create(data: CreateEndUserRequest): Promise<EndUser>;
|
|
1596
1596
|
/**
|
|
1597
|
-
* Update an end-user profile
|
|
1597
|
+
* Update an end-user profile by external ID
|
|
1598
1598
|
*/
|
|
1599
|
-
update(
|
|
1599
|
+
update(externalId: string, data: UpdateEndUserRequest): Promise<EndUser>;
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Delete an end-user
|
|
1602
1602
|
*/
|
|
1603
1603
|
delete(userId: string): Promise<void>;
|
|
1604
1604
|
/**
|
|
1605
|
-
* Link a wallet to an end-user
|
|
1606
|
-
*/
|
|
1607
|
-
linkWallet(userId: string, request: LinkWalletRequest): Promise<EndUser>;
|
|
1608
|
-
/**
|
|
1609
|
-
* Unlink wallet from an end-user
|
|
1605
|
+
* Link a wallet to an end-user by external ID
|
|
1610
1606
|
*/
|
|
1611
|
-
|
|
1607
|
+
linkWallet(externalId: string, request: LinkWalletRequest): Promise<EndUser>;
|
|
1612
1608
|
/**
|
|
1613
|
-
* Get user activity/events
|
|
1609
|
+
* Get user activity/events by external ID
|
|
1614
1610
|
*/
|
|
1615
|
-
getActivity(
|
|
1611
|
+
getActivity(externalId: string, options?: {
|
|
1616
1612
|
page?: number;
|
|
1617
1613
|
page_size?: number;
|
|
1618
1614
|
event_type?: string;
|
|
1619
1615
|
}): Promise<UserActivityResponse>;
|
|
1620
1616
|
/**
|
|
1621
|
-
* Add points to a user
|
|
1622
|
-
*/
|
|
1623
|
-
addPoints(userId: string, points: number, reason?: string): Promise<EndUser>;
|
|
1624
|
-
/**
|
|
1625
|
-
* Add a segment to a user
|
|
1617
|
+
* Add points to a user by external ID
|
|
1626
1618
|
*/
|
|
1627
|
-
|
|
1628
|
-
/**
|
|
1629
|
-
* Remove a segment from a user
|
|
1630
|
-
*/
|
|
1631
|
-
removeSegment(userId: string, segment: string): Promise<EndUser>;
|
|
1619
|
+
addPoints(externalId: string, points: number, reason?: string): Promise<EndUser>;
|
|
1632
1620
|
/**
|
|
1633
1621
|
* Merge two users (moves all data from source to target)
|
|
1634
1622
|
*/
|
|
1635
1623
|
merge(request: MergeUsersRequest): Promise<EndUser>;
|
|
1636
1624
|
/**
|
|
1637
|
-
* Update user attributes (convenience method)
|
|
1625
|
+
* Update user attributes (convenience method) by external ID
|
|
1638
1626
|
*/
|
|
1639
|
-
updateAttributes(
|
|
1627
|
+
updateAttributes(externalId: string, attributes: Record<string, any>): Promise<EndUser>;
|
|
1640
1628
|
/**
|
|
1641
1629
|
* Export users as CSV
|
|
1642
1630
|
*/
|
|
@@ -2465,6 +2453,17 @@ declare class DataViewsClient {
|
|
|
2465
2453
|
* Manage cohort definitions, scoring, and filtered leaderboards with percentiles.
|
|
2466
2454
|
*/
|
|
2467
2455
|
|
|
2456
|
+
interface LeaderboardUserProfile$1 {
|
|
2457
|
+
external_id: string;
|
|
2458
|
+
display_name: string | null;
|
|
2459
|
+
first_name: string | null;
|
|
2460
|
+
last_name: string | null;
|
|
2461
|
+
email: string | null;
|
|
2462
|
+
avatar_url: string | null;
|
|
2463
|
+
country: string | null;
|
|
2464
|
+
city: string | null;
|
|
2465
|
+
attributes: Record<string, unknown>;
|
|
2466
|
+
}
|
|
2468
2467
|
interface CohortLeaderboardEntry {
|
|
2469
2468
|
rank: number;
|
|
2470
2469
|
user_id: string;
|
|
@@ -2472,6 +2471,7 @@ interface CohortLeaderboardEntry {
|
|
|
2472
2471
|
percentile_global: number;
|
|
2473
2472
|
percentile_filtered: number | null;
|
|
2474
2473
|
computed_at?: string;
|
|
2474
|
+
user?: LeaderboardUserProfile$1 | null;
|
|
2475
2475
|
}
|
|
2476
2476
|
interface CohortGroupStats {
|
|
2477
2477
|
filtered_avg_percentile: number | null;
|
|
@@ -2562,6 +2562,17 @@ declare class CohortLeaderboardClient {
|
|
|
2562
2562
|
* Manage fanpass composite scores and filtered leaderboards.
|
|
2563
2563
|
*/
|
|
2564
2564
|
|
|
2565
|
+
interface LeaderboardUserProfile {
|
|
2566
|
+
external_id: string;
|
|
2567
|
+
display_name: string | null;
|
|
2568
|
+
first_name: string | null;
|
|
2569
|
+
last_name: string | null;
|
|
2570
|
+
email: string | null;
|
|
2571
|
+
avatar_url: string | null;
|
|
2572
|
+
country: string | null;
|
|
2573
|
+
city: string | null;
|
|
2574
|
+
attributes: Record<string, unknown>;
|
|
2575
|
+
}
|
|
2565
2576
|
interface FanpassLeaderboardEntry {
|
|
2566
2577
|
rank: number;
|
|
2567
2578
|
user_id: string;
|
|
@@ -2570,6 +2581,7 @@ interface FanpassLeaderboardEntry {
|
|
|
2570
2581
|
raw_score: number;
|
|
2571
2582
|
percentile: number;
|
|
2572
2583
|
computed_at?: string;
|
|
2584
|
+
user?: LeaderboardUserProfile | null;
|
|
2573
2585
|
}
|
|
2574
2586
|
interface FanpassGroupStats {
|
|
2575
2587
|
avg_fan_score: number;
|
|
@@ -2954,4 +2966,4 @@ declare class TimeoutError extends ProofChainError {
|
|
|
2954
2966
|
constructor(message?: string);
|
|
2955
2967
|
}
|
|
2956
2968
|
|
|
2957
|
-
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest, type CreateWebhookRequest, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type NFT, NetworkError, NotFoundError, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RewardAsset, type RewardDefinition, type RewardEarned, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type Settlement, type StepCompletionResult, type StepProgress, type StreamAck, type StreamEventRequest, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserQuestProgress, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletStats, type Webhook, WebhooksResource };
|
|
2969
|
+
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest, type CreateWebhookRequest, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type LeaderboardUserProfile$1 as LeaderboardUserProfile, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type NFT, NetworkError, NotFoundError, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RewardAsset, type RewardDefinition, type RewardEarned, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type Settlement, type StepCompletionResult, type StepProgress, type StreamAck, type StreamEventRequest, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserQuestProgress, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletStats, type Webhook, WebhooksResource };
|
package/dist/index.js
CHANGED
|
@@ -1148,16 +1148,16 @@ var EndUsersClient = class {
|
|
|
1148
1148
|
return this.http.get(`/end-users?${params.toString()}`);
|
|
1149
1149
|
}
|
|
1150
1150
|
/**
|
|
1151
|
-
* Get an end-user by ID
|
|
1151
|
+
* Get an end-user by external ID
|
|
1152
1152
|
*/
|
|
1153
|
-
async get(
|
|
1154
|
-
return this.http.get(`/end-users/${
|
|
1153
|
+
async get(externalId) {
|
|
1154
|
+
return this.http.get(`/end-users/by-external/${encodeURIComponent(externalId)}`);
|
|
1155
1155
|
}
|
|
1156
1156
|
/**
|
|
1157
|
-
* Get an end-user by
|
|
1157
|
+
* Get an end-user by internal UUID (admin use)
|
|
1158
1158
|
*/
|
|
1159
|
-
async
|
|
1160
|
-
return this.http.get(`/end-users
|
|
1159
|
+
async getByInternalId(userId) {
|
|
1160
|
+
return this.http.get(`/end-users/${userId}`);
|
|
1161
1161
|
}
|
|
1162
1162
|
/**
|
|
1163
1163
|
* Create an end-user manually
|
|
@@ -1166,10 +1166,10 @@ var EndUsersClient = class {
|
|
|
1166
1166
|
return this.http.post("/end-users", data);
|
|
1167
1167
|
}
|
|
1168
1168
|
/**
|
|
1169
|
-
* Update an end-user profile
|
|
1169
|
+
* Update an end-user profile by external ID
|
|
1170
1170
|
*/
|
|
1171
|
-
async update(
|
|
1172
|
-
return this.http.patch(`/end-users/${
|
|
1171
|
+
async update(externalId, data) {
|
|
1172
|
+
return this.http.patch(`/end-users/by-external/${encodeURIComponent(externalId)}`, data);
|
|
1173
1173
|
}
|
|
1174
1174
|
/**
|
|
1175
1175
|
* Delete an end-user
|
|
@@ -1178,44 +1178,29 @@ var EndUsersClient = class {
|
|
|
1178
1178
|
await this.http.delete(`/end-users/${userId}`);
|
|
1179
1179
|
}
|
|
1180
1180
|
/**
|
|
1181
|
-
* Link a wallet to an end-user
|
|
1181
|
+
* Link a wallet to an end-user by external ID
|
|
1182
1182
|
*/
|
|
1183
|
-
async linkWallet(
|
|
1184
|
-
return this.http.post(`/end-users/${
|
|
1183
|
+
async linkWallet(externalId, request) {
|
|
1184
|
+
return this.http.post(`/end-users/by-external/${encodeURIComponent(externalId)}/link-wallet`, request);
|
|
1185
1185
|
}
|
|
1186
1186
|
/**
|
|
1187
|
-
*
|
|
1187
|
+
* Get user activity/events by external ID
|
|
1188
1188
|
*/
|
|
1189
|
-
async
|
|
1190
|
-
return this.http.delete(`/end-users/${userId}/wallet`);
|
|
1191
|
-
}
|
|
1192
|
-
/**
|
|
1193
|
-
* Get user activity/events
|
|
1194
|
-
*/
|
|
1195
|
-
async getActivity(userId, options = {}) {
|
|
1189
|
+
async getActivity(externalId, options = {}) {
|
|
1196
1190
|
const params = new URLSearchParams();
|
|
1197
1191
|
if (options.page) params.append("page", options.page.toString());
|
|
1198
1192
|
if (options.page_size) params.append("page_size", options.page_size.toString());
|
|
1199
1193
|
if (options.event_type) params.append("event_type", options.event_type);
|
|
1200
|
-
return this.http.get(`/end-users/${
|
|
1201
|
-
}
|
|
1202
|
-
/**
|
|
1203
|
-
* Add points to a user
|
|
1204
|
-
*/
|
|
1205
|
-
async addPoints(userId, points, reason) {
|
|
1206
|
-
return this.http.post(`/end-users/${userId}/points`, { points, reason });
|
|
1194
|
+
return this.http.get(`/end-users/by-external/${encodeURIComponent(externalId)}/activity?${params.toString()}`);
|
|
1207
1195
|
}
|
|
1208
1196
|
/**
|
|
1209
|
-
* Add
|
|
1197
|
+
* Add points to a user by external ID
|
|
1210
1198
|
*/
|
|
1211
|
-
async
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
*/
|
|
1217
|
-
async removeSegment(userId, segment) {
|
|
1218
|
-
return this.http.delete(`/end-users/${userId}/segments/${encodeURIComponent(segment)}`);
|
|
1199
|
+
async addPoints(externalId, points, reason) {
|
|
1200
|
+
const params = new URLSearchParams();
|
|
1201
|
+
params.append("points", points.toString());
|
|
1202
|
+
if (reason) params.append("reason", reason);
|
|
1203
|
+
return this.http.post(`/end-users/by-external/${encodeURIComponent(externalId)}/add-points?${params.toString()}`, {});
|
|
1219
1204
|
}
|
|
1220
1205
|
/**
|
|
1221
1206
|
* Merge two users (moves all data from source to target)
|
|
@@ -1224,10 +1209,10 @@ var EndUsersClient = class {
|
|
|
1224
1209
|
return this.http.post("/end-users/merge", request);
|
|
1225
1210
|
}
|
|
1226
1211
|
/**
|
|
1227
|
-
* Update user attributes (convenience method)
|
|
1212
|
+
* Update user attributes (convenience method) by external ID
|
|
1228
1213
|
*/
|
|
1229
|
-
async updateAttributes(
|
|
1230
|
-
return this.http.patch(`/end-users/${
|
|
1214
|
+
async updateAttributes(externalId, attributes) {
|
|
1215
|
+
return this.http.patch(`/end-users/by-external/${encodeURIComponent(externalId)}`, { attributes });
|
|
1231
1216
|
}
|
|
1232
1217
|
/**
|
|
1233
1218
|
* Export users as CSV
|
package/dist/index.mjs
CHANGED
|
@@ -1094,16 +1094,16 @@ var EndUsersClient = class {
|
|
|
1094
1094
|
return this.http.get(`/end-users?${params.toString()}`);
|
|
1095
1095
|
}
|
|
1096
1096
|
/**
|
|
1097
|
-
* Get an end-user by ID
|
|
1097
|
+
* Get an end-user by external ID
|
|
1098
1098
|
*/
|
|
1099
|
-
async get(
|
|
1100
|
-
return this.http.get(`/end-users/${
|
|
1099
|
+
async get(externalId) {
|
|
1100
|
+
return this.http.get(`/end-users/by-external/${encodeURIComponent(externalId)}`);
|
|
1101
1101
|
}
|
|
1102
1102
|
/**
|
|
1103
|
-
* Get an end-user by
|
|
1103
|
+
* Get an end-user by internal UUID (admin use)
|
|
1104
1104
|
*/
|
|
1105
|
-
async
|
|
1106
|
-
return this.http.get(`/end-users
|
|
1105
|
+
async getByInternalId(userId) {
|
|
1106
|
+
return this.http.get(`/end-users/${userId}`);
|
|
1107
1107
|
}
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Create an end-user manually
|
|
@@ -1112,10 +1112,10 @@ var EndUsersClient = class {
|
|
|
1112
1112
|
return this.http.post("/end-users", data);
|
|
1113
1113
|
}
|
|
1114
1114
|
/**
|
|
1115
|
-
* Update an end-user profile
|
|
1115
|
+
* Update an end-user profile by external ID
|
|
1116
1116
|
*/
|
|
1117
|
-
async update(
|
|
1118
|
-
return this.http.patch(`/end-users/${
|
|
1117
|
+
async update(externalId, data) {
|
|
1118
|
+
return this.http.patch(`/end-users/by-external/${encodeURIComponent(externalId)}`, data);
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
1121
|
* Delete an end-user
|
|
@@ -1124,44 +1124,29 @@ var EndUsersClient = class {
|
|
|
1124
1124
|
await this.http.delete(`/end-users/${userId}`);
|
|
1125
1125
|
}
|
|
1126
1126
|
/**
|
|
1127
|
-
* Link a wallet to an end-user
|
|
1127
|
+
* Link a wallet to an end-user by external ID
|
|
1128
1128
|
*/
|
|
1129
|
-
async linkWallet(
|
|
1130
|
-
return this.http.post(`/end-users/${
|
|
1129
|
+
async linkWallet(externalId, request) {
|
|
1130
|
+
return this.http.post(`/end-users/by-external/${encodeURIComponent(externalId)}/link-wallet`, request);
|
|
1131
1131
|
}
|
|
1132
1132
|
/**
|
|
1133
|
-
*
|
|
1133
|
+
* Get user activity/events by external ID
|
|
1134
1134
|
*/
|
|
1135
|
-
async
|
|
1136
|
-
return this.http.delete(`/end-users/${userId}/wallet`);
|
|
1137
|
-
}
|
|
1138
|
-
/**
|
|
1139
|
-
* Get user activity/events
|
|
1140
|
-
*/
|
|
1141
|
-
async getActivity(userId, options = {}) {
|
|
1135
|
+
async getActivity(externalId, options = {}) {
|
|
1142
1136
|
const params = new URLSearchParams();
|
|
1143
1137
|
if (options.page) params.append("page", options.page.toString());
|
|
1144
1138
|
if (options.page_size) params.append("page_size", options.page_size.toString());
|
|
1145
1139
|
if (options.event_type) params.append("event_type", options.event_type);
|
|
1146
|
-
return this.http.get(`/end-users/${
|
|
1147
|
-
}
|
|
1148
|
-
/**
|
|
1149
|
-
* Add points to a user
|
|
1150
|
-
*/
|
|
1151
|
-
async addPoints(userId, points, reason) {
|
|
1152
|
-
return this.http.post(`/end-users/${userId}/points`, { points, reason });
|
|
1140
|
+
return this.http.get(`/end-users/by-external/${encodeURIComponent(externalId)}/activity?${params.toString()}`);
|
|
1153
1141
|
}
|
|
1154
1142
|
/**
|
|
1155
|
-
* Add
|
|
1143
|
+
* Add points to a user by external ID
|
|
1156
1144
|
*/
|
|
1157
|
-
async
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
*/
|
|
1163
|
-
async removeSegment(userId, segment) {
|
|
1164
|
-
return this.http.delete(`/end-users/${userId}/segments/${encodeURIComponent(segment)}`);
|
|
1145
|
+
async addPoints(externalId, points, reason) {
|
|
1146
|
+
const params = new URLSearchParams();
|
|
1147
|
+
params.append("points", points.toString());
|
|
1148
|
+
if (reason) params.append("reason", reason);
|
|
1149
|
+
return this.http.post(`/end-users/by-external/${encodeURIComponent(externalId)}/add-points?${params.toString()}`, {});
|
|
1165
1150
|
}
|
|
1166
1151
|
/**
|
|
1167
1152
|
* Merge two users (moves all data from source to target)
|
|
@@ -1170,10 +1155,10 @@ var EndUsersClient = class {
|
|
|
1170
1155
|
return this.http.post("/end-users/merge", request);
|
|
1171
1156
|
}
|
|
1172
1157
|
/**
|
|
1173
|
-
* Update user attributes (convenience method)
|
|
1158
|
+
* Update user attributes (convenience method) by external ID
|
|
1174
1159
|
*/
|
|
1175
|
-
async updateAttributes(
|
|
1176
|
-
return this.http.patch(`/end-users/${
|
|
1160
|
+
async updateAttributes(externalId, attributes) {
|
|
1161
|
+
return this.http.patch(`/end-users/by-external/${encodeURIComponent(externalId)}`, { attributes });
|
|
1177
1162
|
}
|
|
1178
1163
|
/**
|
|
1179
1164
|
* Export users as CSV
|
package/package.json
CHANGED