@clikgate/node 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +11 -0
- package/dist/cjs/client.d.ts +16 -0
- package/dist/cjs/client.js +25 -0
- package/dist/cjs/customer-id.d.ts +26 -0
- package/dist/cjs/customer-id.js +52 -0
- package/dist/cjs/enums.js +1 -1
- package/dist/cjs/errors.d.ts +1 -1
- package/dist/cjs/generated/index.d.ts +265 -6
- package/dist/cjs/generated/index.js +83 -3
- package/dist/cjs/identity.d.ts +12 -2
- package/dist/cjs/identity.js +36 -2
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/known-customers.d.ts +45 -0
- package/dist/cjs/known-customers.js +95 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client.d.ts +16 -0
- package/dist/esm/client.js +25 -0
- package/dist/esm/customer-id.d.ts +26 -0
- package/dist/esm/customer-id.js +47 -0
- package/dist/esm/enums.js +1 -1
- package/dist/esm/errors.d.ts +1 -1
- package/dist/esm/generated/index.d.ts +265 -6
- package/dist/esm/generated/index.js +80 -1
- package/dist/esm/identity.d.ts +12 -2
- package/dist/esm/identity.js +35 -2
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/known-customers.d.ts +45 -0
- package/dist/esm/known-customers.js +90 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -2776,6 +2776,11 @@ export interface CountGoalNameSchema {
|
|
|
2776
2776
|
* `once_per_click`: the first attributed event per (click, goal) counts; `every`: all count.
|
|
2777
2777
|
*/
|
|
2778
2778
|
export type CountMode = 'once_per_click' | 'every';
|
|
2779
|
+
export interface CountShare {
|
|
2780
|
+
'key': string;
|
|
2781
|
+
'count': number;
|
|
2782
|
+
'share': number;
|
|
2783
|
+
}
|
|
2779
2784
|
/**
|
|
2780
2785
|
* One-off export by email (`POST /v1/exports`). No recipients: the requesting member.
|
|
2781
2786
|
*/
|
|
@@ -3019,6 +3024,7 @@ export interface DashboardListResponse {
|
|
|
3019
3024
|
'object'?: 'list';
|
|
3020
3025
|
'data': Array<DashboardInfoResponse>;
|
|
3021
3026
|
'home_dashboard_id': string | null;
|
|
3027
|
+
'sidebar_dashboard_ids'?: Array<string>;
|
|
3022
3028
|
'limit': number | null;
|
|
3023
3029
|
'sharing_included': boolean;
|
|
3024
3030
|
'logo_included': boolean;
|
|
@@ -3188,11 +3194,43 @@ export interface DefaultDashboardsResponse {
|
|
|
3188
3194
|
[key: string]: string;
|
|
3189
3195
|
};
|
|
3190
3196
|
'redirects': Array<DefaultDashboardRedirect>;
|
|
3197
|
+
'focus'?: 'standard' | 'business' | 'creator' | 'partners' | 'links';
|
|
3198
|
+
'view'?: 'focused' | 'standard';
|
|
3191
3199
|
/**
|
|
3192
3200
|
* true for live-environment data, false for test mode.
|
|
3193
3201
|
*/
|
|
3194
3202
|
'livemode': boolean;
|
|
3195
3203
|
}
|
|
3204
|
+
/**
|
|
3205
|
+
* iOS first launches in the period and how the pasteboard step went. `match_rate` is `matched / attempted`
|
|
3206
|
+
* (`null` when nothing was attempted); never estimated.
|
|
3207
|
+
*/
|
|
3208
|
+
export interface DeferredMatchRateResponse {
|
|
3209
|
+
'platform'?: 'ios';
|
|
3210
|
+
/**
|
|
3211
|
+
* The app's `pasteboard_matching` is `on_interstitial_tap`
|
|
3212
|
+
*/
|
|
3213
|
+
'paste_flow_enabled': boolean;
|
|
3214
|
+
'period': MatchRatePeriodInfo;
|
|
3215
|
+
/**
|
|
3216
|
+
* iOS installs first opened in the period
|
|
3217
|
+
*/
|
|
3218
|
+
'first_launches': number;
|
|
3219
|
+
/**
|
|
3220
|
+
* First launches with a pasteboard outcome (the paste flow ran)
|
|
3221
|
+
*/
|
|
3222
|
+
'attempted': number;
|
|
3223
|
+
/**
|
|
3224
|
+
* Attempted first launches attributed with match type `pasteboard`
|
|
3225
|
+
*/
|
|
3226
|
+
'matched': number;
|
|
3227
|
+
/**
|
|
3228
|
+
* matched / attempted, 4 decimals; null when attempted is 0
|
|
3229
|
+
*/
|
|
3230
|
+
'match_rate': number | null;
|
|
3231
|
+
'outcomes': PasteboardOutcomeCounts;
|
|
3232
|
+
'other_matches': OtherMatchCounts;
|
|
3233
|
+
}
|
|
3196
3234
|
export interface DeleteIdentitySignalsResponse {
|
|
3197
3235
|
'object'?: 'identity_signals_deletion';
|
|
3198
3236
|
'subject': SubjectInfo;
|
|
@@ -3222,6 +3260,37 @@ export interface DestinationCheckResponse {
|
|
|
3222
3260
|
'livemode': boolean;
|
|
3223
3261
|
}
|
|
3224
3262
|
export type DestinationStatus = 'active' | 'paused' | 'error';
|
|
3263
|
+
export interface DeviceChangeResponse {
|
|
3264
|
+
'id': string;
|
|
3265
|
+
'app_id': string;
|
|
3266
|
+
'kind': 'switch' | 'second_device';
|
|
3267
|
+
'from_platform': string;
|
|
3268
|
+
'to_platform': string;
|
|
3269
|
+
'from_device_model': string | null;
|
|
3270
|
+
'to_device_model': string | null;
|
|
3271
|
+
'from_last_seen_at': string | null;
|
|
3272
|
+
'to_first_open_at': string;
|
|
3273
|
+
'gap_days': number | null;
|
|
3274
|
+
'created_at': string;
|
|
3275
|
+
}
|
|
3276
|
+
export interface DeviceChangesListResponse {
|
|
3277
|
+
'object'?: 'list';
|
|
3278
|
+
'data': Array<DeviceChangeResponse>;
|
|
3279
|
+
'locked'?: boolean;
|
|
3280
|
+
}
|
|
3281
|
+
export interface DeviceChangesReportResponse {
|
|
3282
|
+
'locked': boolean;
|
|
3283
|
+
'total': number;
|
|
3284
|
+
'lock_message'?: string | null;
|
|
3285
|
+
'months'?: Array<MonthCount>;
|
|
3286
|
+
'platform_moves'?: Array<CountShare>;
|
|
3287
|
+
'top_from_models'?: Array<CountShare>;
|
|
3288
|
+
'top_to_models'?: Array<CountShare>;
|
|
3289
|
+
'gap_days_median'?: number | null;
|
|
3290
|
+
'gap_days_distribution'?: Array<CountShare>;
|
|
3291
|
+
'phones_per_customer'?: Array<CountShare>;
|
|
3292
|
+
'old_phone_seen_again_share'?: number | null;
|
|
3293
|
+
}
|
|
3225
3294
|
/**
|
|
3226
3295
|
* An Apple key with DeviceCheck enabled (Certificates, Identifiers & Profiles > Keys).
|
|
3227
3296
|
*/
|
|
@@ -3954,6 +4023,7 @@ export interface FraudRuleSettingResponse {
|
|
|
3954
4023
|
export interface FraudRules {
|
|
3955
4024
|
'block_self_referral'?: boolean;
|
|
3956
4025
|
'block_existing_users'?: boolean;
|
|
4026
|
+
'require_account_date'?: boolean;
|
|
3957
4027
|
'block_reinstall_rereferral'?: boolean;
|
|
3958
4028
|
'require_attestation'?: boolean;
|
|
3959
4029
|
'allow_emulators'?: boolean;
|
|
@@ -4807,6 +4877,8 @@ export interface IdentifyPersonResponse {
|
|
|
4807
4877
|
'object'?: 'person_identified';
|
|
4808
4878
|
'person_id': string;
|
|
4809
4879
|
'label_ignored'?: 'plan' | 'lower_rank' | null;
|
|
4880
|
+
'customer_since_ignored'?: 'unverified' | 'invalid' | null;
|
|
4881
|
+
'customer_id_warning'?: 'looks_like_phone' | 'looks_like_email' | 'looks_like_national_id' | null;
|
|
4810
4882
|
/**
|
|
4811
4883
|
* true for live-environment data, false for test mode.
|
|
4812
4884
|
*/
|
|
@@ -5082,6 +5154,8 @@ export interface InstallInfoResponse {
|
|
|
5082
5154
|
'is_reinstall': boolean;
|
|
5083
5155
|
'previous_install_id': string | null;
|
|
5084
5156
|
'attribution_status': string;
|
|
5157
|
+
'install_kind'?: string;
|
|
5158
|
+
'new_phone_of_existing_customer'?: boolean;
|
|
5085
5159
|
'match_type': string | null;
|
|
5086
5160
|
'confidence': number | null;
|
|
5087
5161
|
'click_id': string | null;
|
|
@@ -5164,6 +5238,29 @@ export interface JobInfoResponse {
|
|
|
5164
5238
|
'finished_at': string | null;
|
|
5165
5239
|
'livemode'?: boolean;
|
|
5166
5240
|
}
|
|
5241
|
+
export interface KnownCustomerRemoveResponse {
|
|
5242
|
+
'removed': boolean;
|
|
5243
|
+
}
|
|
5244
|
+
export interface KnownCustomerRemoveSchema {
|
|
5245
|
+
'customer_id': string;
|
|
5246
|
+
}
|
|
5247
|
+
export interface KnownCustomersImportResponse {
|
|
5248
|
+
'object'?: 'known_customers_import';
|
|
5249
|
+
'accepted': number;
|
|
5250
|
+
'refused': number;
|
|
5251
|
+
'refused_by_reason': {
|
|
5252
|
+
[key: string]: number;
|
|
5253
|
+
};
|
|
5254
|
+
/**
|
|
5255
|
+
* true for live-environment data, false for test mode.
|
|
5256
|
+
*/
|
|
5257
|
+
'livemode': boolean;
|
|
5258
|
+
}
|
|
5259
|
+
export interface KnownCustomersImportSchema {
|
|
5260
|
+
'customers': Array<{
|
|
5261
|
+
[key: string]: any;
|
|
5262
|
+
}>;
|
|
5263
|
+
}
|
|
5167
5264
|
export interface LabelHistoryEntry {
|
|
5168
5265
|
'label': string | null;
|
|
5169
5266
|
'source': string;
|
|
@@ -6196,6 +6293,15 @@ export interface MatchQualityResponse {
|
|
|
6196
6293
|
*/
|
|
6197
6294
|
'livemode': boolean;
|
|
6198
6295
|
}
|
|
6296
|
+
/**
|
|
6297
|
+
* iPhone deferred deep link match rate: the rolling window ending now.
|
|
6298
|
+
*/
|
|
6299
|
+
export type MatchRatePeriod = '7d' | '30d' | '90d';
|
|
6300
|
+
export interface MatchRatePeriodInfo {
|
|
6301
|
+
'key': '7d' | '30d' | '90d';
|
|
6302
|
+
'from': string;
|
|
6303
|
+
'to': string;
|
|
6304
|
+
}
|
|
6199
6305
|
export interface MatchRejection {
|
|
6200
6306
|
'reason': string;
|
|
6201
6307
|
'text': string;
|
|
@@ -6283,6 +6389,11 @@ export interface Money {
|
|
|
6283
6389
|
'currency': string;
|
|
6284
6390
|
'converted'?: boolean;
|
|
6285
6391
|
}
|
|
6392
|
+
export interface MonthCount {
|
|
6393
|
+
'month': string;
|
|
6394
|
+
'switches': number;
|
|
6395
|
+
'second_phones': number;
|
|
6396
|
+
}
|
|
6286
6397
|
export interface MoveGroupSchema {
|
|
6287
6398
|
'group_id': string;
|
|
6288
6399
|
}
|
|
@@ -6417,9 +6528,10 @@ export interface NewCustomerReferral {
|
|
|
6417
6528
|
}
|
|
6418
6529
|
export type NotApplicableReason = 'app_only' | 'created_after_activity';
|
|
6419
6530
|
/**
|
|
6420
|
-
* What a note is about: the whole organisation, or one campaign, link, app or goal.
|
|
6531
|
+
* What a note is about: the whole organisation, or one campaign, link, app or goal. `panel` (owner, 2026-11-11): a
|
|
6532
|
+
* note written on one dashboard panel, shown on that panel only.
|
|
6421
6533
|
*/
|
|
6422
|
-
export type NoteScope = 'organization' | 'campaign' | 'link' | 'app' | 'goal';
|
|
6534
|
+
export type NoteScope = 'organization' | 'campaign' | 'link' | 'app' | 'goal' | 'panel';
|
|
6423
6535
|
export type NoteSource = 'member' | 'system';
|
|
6424
6536
|
export type OfflineChannel = 'ussd' | 'sms_keyword' | 'agent' | 'pos' | 'in_store' | 'call_center' | 'event' | 'print' | 'radio' | 'other';
|
|
6425
6537
|
export interface OfflineLocationSchema {
|
|
@@ -6584,6 +6696,10 @@ export interface OrganizationCountriesSchema {
|
|
|
6584
6696
|
'default_allowed_countries'?: Array<string> | null;
|
|
6585
6697
|
'default_block_message'?: string | null;
|
|
6586
6698
|
}
|
|
6699
|
+
export interface OtherMatchCounts {
|
|
6700
|
+
'app_link'?: number;
|
|
6701
|
+
'organic'?: number;
|
|
6702
|
+
}
|
|
6587
6703
|
/**
|
|
6588
6704
|
* POST /v1/referrals/{id}/override: staff, the org owner, or an API key (audit-logged).
|
|
6589
6705
|
*/
|
|
@@ -6665,6 +6781,8 @@ export interface PanelQuerySchema {
|
|
|
6665
6781
|
'explore'?: {
|
|
6666
6782
|
[key: string]: any;
|
|
6667
6783
|
} | null;
|
|
6784
|
+
'funnel_id'?: string | null;
|
|
6785
|
+
'hide_stuck'?: boolean | null;
|
|
6668
6786
|
}
|
|
6669
6787
|
export interface PanelSpecSchema {
|
|
6670
6788
|
'type': PanelType;
|
|
@@ -6850,6 +6968,17 @@ export interface PartnerProgramInfoResponse {
|
|
|
6850
6968
|
*/
|
|
6851
6969
|
export type PartnerStatus = 'invited' | 'applied' | 'active' | 'paused' | 'removed';
|
|
6852
6970
|
export type PasteboardMatching = 'off' | 'on_interstitial_tap';
|
|
6971
|
+
/**
|
|
6972
|
+
* First launches by what the iOS SDK's pasteboard step found (`expired` is derived by the server).
|
|
6973
|
+
*/
|
|
6974
|
+
export interface PasteboardOutcomeCounts {
|
|
6975
|
+
'token_found'?: number;
|
|
6976
|
+
'no_link'?: number;
|
|
6977
|
+
'no_token'?: number;
|
|
6978
|
+
'denied'?: number;
|
|
6979
|
+
'paste_control'?: number;
|
|
6980
|
+
'expired'?: number;
|
|
6981
|
+
}
|
|
6853
6982
|
export interface PauseLinkSchema {
|
|
6854
6983
|
'reason'?: string | null;
|
|
6855
6984
|
}
|
|
@@ -7011,6 +7140,8 @@ export interface PeopleIdentifySchema {
|
|
|
7011
7140
|
* Optional label you choose for this person, 1-80 characters after trimming; an empty string clears it. Shown to your team instead of the click ID. Don't put information in labels that your customers wouldn't expect you to keep.
|
|
7012
7141
|
*/
|
|
7013
7142
|
'label'?: string | null;
|
|
7143
|
+
'customer_since'?: string | null;
|
|
7144
|
+
'customer_since_replace'?: boolean;
|
|
7014
7145
|
}
|
|
7015
7146
|
export interface PeopleSearchResponse {
|
|
7016
7147
|
'object'?: 'list';
|
|
@@ -7019,10 +7150,11 @@ export interface PeopleSearchResponse {
|
|
|
7019
7150
|
'next_cursor': string | null;
|
|
7020
7151
|
}
|
|
7021
7152
|
/**
|
|
7022
|
-
* Search text goes in the body, never in the URL, and is never logged.
|
|
7153
|
+
* Search text goes in the body, never in the URL, and is never logged. Empty: the most recently active people.
|
|
7023
7154
|
*/
|
|
7024
7155
|
export interface PeopleSearchSchema {
|
|
7025
|
-
'q'
|
|
7156
|
+
'q'?: string;
|
|
7157
|
+
'segment'?: 'all' | 'new_installs' | 'uninstalled' | 'referrers' | 'referred';
|
|
7026
7158
|
'cursor'?: string | null;
|
|
7027
7159
|
'limit'?: number;
|
|
7028
7160
|
}
|
|
@@ -7055,6 +7187,17 @@ export interface PeriodSummary {
|
|
|
7055
7187
|
'ends_at': string | null;
|
|
7056
7188
|
}
|
|
7057
7189
|
export type PeriodType = 'all_time' | 'daily' | 'weekly' | 'monthly' | 'custom' | 'challenge';
|
|
7190
|
+
/**
|
|
7191
|
+
* The person's latest install of your apps.
|
|
7192
|
+
*/
|
|
7193
|
+
export interface PersonAppSummary {
|
|
7194
|
+
'app_id': string;
|
|
7195
|
+
'platform': string;
|
|
7196
|
+
'installed_at': string;
|
|
7197
|
+
'status': 'installed' | 'uninstalled' | 'unknown';
|
|
7198
|
+
'uninstalled_at': string | null;
|
|
7199
|
+
'reinstall': boolean;
|
|
7200
|
+
}
|
|
7058
7201
|
export interface PersonInfoResponse {
|
|
7059
7202
|
'object'?: 'person';
|
|
7060
7203
|
'id': string;
|
|
@@ -7092,6 +7235,37 @@ export interface PersonRef {
|
|
|
7092
7235
|
'id': string;
|
|
7093
7236
|
'label'?: string | null;
|
|
7094
7237
|
}
|
|
7238
|
+
/**
|
|
7239
|
+
* The referral programme the person refers in (the one with the most qualified friends).
|
|
7240
|
+
*/
|
|
7241
|
+
export interface PersonReferralSummary {
|
|
7242
|
+
'program_id': string;
|
|
7243
|
+
'program_name': string;
|
|
7244
|
+
'referrer_id': string;
|
|
7245
|
+
'code': string | null;
|
|
7246
|
+
'status': string;
|
|
7247
|
+
'installs': number;
|
|
7248
|
+
'qualified': number;
|
|
7249
|
+
'rank': number | null;
|
|
7250
|
+
'rank_board': string | null;
|
|
7251
|
+
'rank_board_id': string | null;
|
|
7252
|
+
'shares': number;
|
|
7253
|
+
'shares_by_app': {
|
|
7254
|
+
[key: string]: number;
|
|
7255
|
+
};
|
|
7256
|
+
}
|
|
7257
|
+
/**
|
|
7258
|
+
* Who brought the person in, when they installed through a referral.
|
|
7259
|
+
*/
|
|
7260
|
+
export interface PersonReferredBySummary {
|
|
7261
|
+
'program_id': string;
|
|
7262
|
+
'program_name': string;
|
|
7263
|
+
'referrer_id': string;
|
|
7264
|
+
'referrer_name': string | null;
|
|
7265
|
+
'code': string | null;
|
|
7266
|
+
'channel': string | null;
|
|
7267
|
+
'status': string;
|
|
7268
|
+
}
|
|
7095
7269
|
/**
|
|
7096
7270
|
* A search result: the label **and** the click ID (labels aren't unique).
|
|
7097
7271
|
*/
|
|
@@ -7106,7 +7280,12 @@ export interface PersonSummaryResponse {
|
|
|
7106
7280
|
'goal_value_minor': {
|
|
7107
7281
|
[key: string]: number;
|
|
7108
7282
|
};
|
|
7109
|
-
'matched_on': 'label' | 'customer_id' | 'click_id';
|
|
7283
|
+
'matched_on': 'label' | 'customer_id' | 'click_id' | null;
|
|
7284
|
+
'app'?: PersonAppSummary | null;
|
|
7285
|
+
'joined_via'?: string | null;
|
|
7286
|
+
'joined_campaign_id'?: string | null;
|
|
7287
|
+
'referrer'?: PersonReferralSummary | null;
|
|
7288
|
+
'referred_by'?: PersonReferredBySummary | null;
|
|
7110
7289
|
/**
|
|
7111
7290
|
* true for live-environment data, false for test mode.
|
|
7112
7291
|
*/
|
|
@@ -7803,6 +7982,8 @@ export interface ReferralInfoResponse {
|
|
|
7803
7982
|
'disqualified_at': string | null;
|
|
7804
7983
|
'rejected_at': string | null;
|
|
7805
7984
|
'reason': string | null;
|
|
7985
|
+
'reason_detail'?: string | null;
|
|
7986
|
+
'reason_message'?: string | null;
|
|
7806
7987
|
'fraud_flags': Array<string>;
|
|
7807
7988
|
'referee_uninstalled_after_qualification': boolean;
|
|
7808
7989
|
'program': {
|
|
@@ -8743,7 +8924,7 @@ export interface SendDomainSetupSchema {
|
|
|
8743
8924
|
'email': string;
|
|
8744
8925
|
'note'?: string | null;
|
|
8745
8926
|
}
|
|
8746
|
-
export type SendStatus = 'queued' | 'sent' | 'failed' | 'skipped_fraud' | 'skipped_no_click_id' | 'skipped_probabilistic' | 'skipped_consent' | 'skipped_not_supported' | 'skipped_plan' | 'skipped_unconfirmed' | 'skipped_reversed' | 'skipped_disputed' | 'skipped_window_passed' | 'skipped_partner_handles_app' | 'skipped_business_messaging';
|
|
8927
|
+
export type SendStatus = 'queued' | 'sent' | 'failed' | 'skipped_fraud' | 'skipped_no_click_id' | 'skipped_probabilistic' | 'skipped_consent' | 'skipped_not_supported' | 'skipped_plan' | 'skipped_unconfirmed' | 'skipped_reversed' | 'skipped_disputed' | 'skipped_window_passed' | 'skipped_partner_handles_app' | 'skipped_business_messaging' | 'skipped_existing_user';
|
|
8747
8928
|
/**
|
|
8748
8929
|
* `consent` on `POST /v1/conversions` and sales: the four purposes and an optional region.
|
|
8749
8930
|
*/
|
|
@@ -9613,14 +9794,23 @@ export interface UninstallMeasures {
|
|
|
9613
9794
|
* Installs whose first open is in the period (the cohort)
|
|
9614
9795
|
*/
|
|
9615
9796
|
'installs': number;
|
|
9797
|
+
'existing_user_uninstalls'?: number;
|
|
9616
9798
|
/**
|
|
9617
9799
|
* Cohort installs Clikgate can check (push token, not opted out)
|
|
9618
9800
|
*/
|
|
9619
9801
|
'tracked_installs': number;
|
|
9802
|
+
/**
|
|
9803
|
+
* Checked installs ÷ installs (0-1, 4 dp): the share of the cohort the rates cover; null with no installs
|
|
9804
|
+
*/
|
|
9805
|
+
'coverage'?: number | null;
|
|
9620
9806
|
/**
|
|
9621
9807
|
* Uninstalls detected in the period
|
|
9622
9808
|
*/
|
|
9623
9809
|
'uninstalls': number;
|
|
9810
|
+
/**
|
|
9811
|
+
* Cohort installs whose uninstall was later reversed because the app opened again (a reinstall that kept the installation id, or a stale push token)
|
|
9812
|
+
*/
|
|
9813
|
+
'uninstalls_reverted'?: number;
|
|
9624
9814
|
'uninstall_rate_d1'?: number | null;
|
|
9625
9815
|
'uninstall_rate_d7'?: number | null;
|
|
9626
9816
|
'uninstall_rate_d30'?: number | null;
|
|
@@ -9681,14 +9871,23 @@ export interface UninstallReportRow {
|
|
|
9681
9871
|
* Installs whose first open is in the period (the cohort)
|
|
9682
9872
|
*/
|
|
9683
9873
|
'installs': number;
|
|
9874
|
+
'existing_user_uninstalls'?: number;
|
|
9684
9875
|
/**
|
|
9685
9876
|
* Cohort installs Clikgate can check (push token, not opted out)
|
|
9686
9877
|
*/
|
|
9687
9878
|
'tracked_installs': number;
|
|
9879
|
+
/**
|
|
9880
|
+
* Checked installs ÷ installs (0-1, 4 dp): the share of the cohort the rates cover; null with no installs
|
|
9881
|
+
*/
|
|
9882
|
+
'coverage'?: number | null;
|
|
9688
9883
|
/**
|
|
9689
9884
|
* Uninstalls detected in the period
|
|
9690
9885
|
*/
|
|
9691
9886
|
'uninstalls': number;
|
|
9887
|
+
/**
|
|
9888
|
+
* Cohort installs whose uninstall was later reversed because the app opened again (a reinstall that kept the installation id, or a stale push token)
|
|
9889
|
+
*/
|
|
9890
|
+
'uninstalls_reverted'?: number;
|
|
9692
9891
|
'uninstall_rate_d1'?: number | null;
|
|
9693
9892
|
'uninstall_rate_d7'?: number | null;
|
|
9694
9893
|
'uninstall_rate_d30'?: number | null;
|
|
@@ -11384,6 +11583,19 @@ export declare class AnalyticsApi {
|
|
|
11384
11583
|
dataFreshness(query?: {
|
|
11385
11584
|
'sources'?: string | null;
|
|
11386
11585
|
}, options?: RequestOptions): Promise<FreshnessResponse>;
|
|
11586
|
+
/**
|
|
11587
|
+
* Device Changes Report
|
|
11588
|
+
*
|
|
11589
|
+
* `GET /v1/analytics/device-changes`
|
|
11590
|
+
*
|
|
11591
|
+
* @example
|
|
11592
|
+
* await clikgate.api.analytics.deviceChangesReport();
|
|
11593
|
+
*/
|
|
11594
|
+
deviceChangesReport(query?: {
|
|
11595
|
+
'from'?: string | null;
|
|
11596
|
+
'to'?: string | null;
|
|
11597
|
+
'app_id'?: string | null;
|
|
11598
|
+
}, options?: RequestOptions): Promise<DeviceChangesReportResponse>;
|
|
11387
11599
|
/**
|
|
11388
11600
|
* Explore
|
|
11389
11601
|
*
|
|
@@ -12059,6 +12271,19 @@ export declare class AppsApi {
|
|
|
12059
12271
|
* await clikgate.api.apps.fetchSdkHealth('app_…');
|
|
12060
12272
|
*/
|
|
12061
12273
|
fetchSdkHealth(appId: string, options?: RequestOptions): Promise<SdkHealthResponse>;
|
|
12274
|
+
/**
|
|
12275
|
+
* Iphone Deferred Deep Link Match Rate
|
|
12276
|
+
*
|
|
12277
|
+
* iOS first launches in the period (rolling, ending now) and what the iOS SDK's pasteboard step found: `attempted` (the paste flow ran), `matched` (attributed by the pasteboard token), `match_rate` (matched / attempted, `null` when nothing was attempted) and the outcome breakdown. Measured, never estimated. iOS apps only: an Android app answers 422 `platform_not_ios`.
|
|
12278
|
+
*
|
|
12279
|
+
* `GET /v1/apps/{app_id}/iphone-deferred-match-rate`
|
|
12280
|
+
*
|
|
12281
|
+
* @example
|
|
12282
|
+
* await clikgate.api.apps.iphoneDeferredDeepLinkMatchRate('app_…');
|
|
12283
|
+
*/
|
|
12284
|
+
iphoneDeferredDeepLinkMatchRate(appId: string, query?: {
|
|
12285
|
+
'period'?: MatchRatePeriod | null;
|
|
12286
|
+
}, options?: RequestOptions): Promise<DeferredMatchRateResponse>;
|
|
12062
12287
|
/**
|
|
12063
12288
|
* Link Subdomain Availability
|
|
12064
12289
|
*
|
|
@@ -14310,6 +14535,30 @@ export declare class JobsApi {
|
|
|
14310
14535
|
*/
|
|
14311
14536
|
fetchJob(jobId: string, options?: RequestOptions): Promise<JobInfoResponse>;
|
|
14312
14537
|
}
|
|
14538
|
+
/**
|
|
14539
|
+
* KnownCustomers: generated from openapi.json. See https://clikgate.com/docs/api.
|
|
14540
|
+
*/
|
|
14541
|
+
export declare class KnownCustomersApi {
|
|
14542
|
+
private readonly r;
|
|
14543
|
+
/**
|
|
14544
|
+
* Import Known Customers
|
|
14545
|
+
*
|
|
14546
|
+
* `POST /v1/known-customers/import`
|
|
14547
|
+
*
|
|
14548
|
+
* @example
|
|
14549
|
+
* await clikgate.api.knownCustomers.importKnownCustomers({ … });
|
|
14550
|
+
*/
|
|
14551
|
+
importKnownCustomers(body: KnownCustomersImportSchema, options?: RequestOptions): Promise<KnownCustomersImportResponse>;
|
|
14552
|
+
/**
|
|
14553
|
+
* Remove Known Customer
|
|
14554
|
+
*
|
|
14555
|
+
* `POST /v1/known-customers/remove`
|
|
14556
|
+
*
|
|
14557
|
+
* @example
|
|
14558
|
+
* await clikgate.api.knownCustomers.removeKnownCustomer({ … });
|
|
14559
|
+
*/
|
|
14560
|
+
removeKnownCustomer(body: KnownCustomerRemoveSchema, options?: RequestOptions): Promise<KnownCustomerRemoveResponse>;
|
|
14561
|
+
}
|
|
14313
14562
|
/**
|
|
14314
14563
|
* Leaderboards: generated from openapi.json. See https://clikgate.com/docs/api.
|
|
14315
14564
|
*/
|
|
@@ -16085,6 +16334,15 @@ export declare class PeopleApi {
|
|
|
16085
16334
|
* await clikgate.api.people.fetchPerson('<person_id>');
|
|
16086
16335
|
*/
|
|
16087
16336
|
fetchPerson(personId: string, options?: RequestOptions): Promise<PersonInfoResponse>;
|
|
16337
|
+
/**
|
|
16338
|
+
* Fetch Person Device Changes
|
|
16339
|
+
*
|
|
16340
|
+
* `GET /v1/people/{person_id}/device-changes`
|
|
16341
|
+
*
|
|
16342
|
+
* @example
|
|
16343
|
+
* await clikgate.api.people.fetchPersonDeviceChanges('<person_id>');
|
|
16344
|
+
*/
|
|
16345
|
+
fetchPersonDeviceChanges(personId: string, options?: RequestOptions): Promise<DeviceChangesListResponse>;
|
|
16088
16346
|
/**
|
|
16089
16347
|
* Identify Person
|
|
16090
16348
|
*
|
|
@@ -17508,6 +17766,7 @@ export declare class ApiClient {
|
|
|
17508
17766
|
readonly inbound: InboundApi;
|
|
17509
17767
|
readonly installs: InstallsApi;
|
|
17510
17768
|
readonly jobs: JobsApi;
|
|
17769
|
+
readonly knownCustomers: KnownCustomersApi;
|
|
17511
17770
|
readonly leaderboards: LeaderboardsApi;
|
|
17512
17771
|
readonly links: LinksApi;
|
|
17513
17772
|
readonly migration: MigrationApi;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by server/codegen/generate.mjs from openapi.json. Do not edit by hand.
|
|
2
|
-
// Source sha256
|
|
2
|
+
// Source sha256 86cb28d5c8c70cb6793d1c9145f99790d749cc09b447fa0f702d4c9cbbeeabd8; OpenAPI Generator 7.26.0 (typescript-fetch, custom templates).
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
import { encodePathSegment } from '../http.js';
|
|
5
5
|
/**
|
|
@@ -913,6 +913,19 @@ export class AnalyticsApi {
|
|
|
913
913
|
const { data } = await this.r.request({ method: 'GET', path, query, ...options });
|
|
914
914
|
return data;
|
|
915
915
|
}
|
|
916
|
+
/**
|
|
917
|
+
* Device Changes Report
|
|
918
|
+
*
|
|
919
|
+
* `GET /v1/analytics/device-changes`
|
|
920
|
+
*
|
|
921
|
+
* @example
|
|
922
|
+
* await clikgate.api.analytics.deviceChangesReport();
|
|
923
|
+
*/
|
|
924
|
+
async deviceChangesReport(query = {}, options = {}) {
|
|
925
|
+
const path = `/v1/analytics/device-changes`;
|
|
926
|
+
const { data } = await this.r.request({ method: 'GET', path, query, ...options });
|
|
927
|
+
return data;
|
|
928
|
+
}
|
|
916
929
|
/**
|
|
917
930
|
* Explore
|
|
918
931
|
*
|
|
@@ -1703,6 +1716,21 @@ export class AppsApi {
|
|
|
1703
1716
|
const { data } = await this.r.request({ method: 'GET', path, ...options });
|
|
1704
1717
|
return data;
|
|
1705
1718
|
}
|
|
1719
|
+
/**
|
|
1720
|
+
* Iphone Deferred Deep Link Match Rate
|
|
1721
|
+
*
|
|
1722
|
+
* iOS first launches in the period (rolling, ending now) and what the iOS SDK's pasteboard step found: `attempted` (the paste flow ran), `matched` (attributed by the pasteboard token), `match_rate` (matched / attempted, `null` when nothing was attempted) and the outcome breakdown. Measured, never estimated. iOS apps only: an Android app answers 422 `platform_not_ios`.
|
|
1723
|
+
*
|
|
1724
|
+
* `GET /v1/apps/{app_id}/iphone-deferred-match-rate`
|
|
1725
|
+
*
|
|
1726
|
+
* @example
|
|
1727
|
+
* await clikgate.api.apps.iphoneDeferredDeepLinkMatchRate('app_…');
|
|
1728
|
+
*/
|
|
1729
|
+
async iphoneDeferredDeepLinkMatchRate(appId, query = {}, options = {}) {
|
|
1730
|
+
const path = `/v1/apps/${encodePathSegment(appId)}/iphone-deferred-match-rate`;
|
|
1731
|
+
const { data } = await this.r.request({ method: 'GET', path, query, ...options });
|
|
1732
|
+
return data;
|
|
1733
|
+
}
|
|
1706
1734
|
/**
|
|
1707
1735
|
* Link Subdomain Availability
|
|
1708
1736
|
*
|
|
@@ -4614,6 +4642,42 @@ export class JobsApi {
|
|
|
4614
4642
|
return data;
|
|
4615
4643
|
}
|
|
4616
4644
|
}
|
|
4645
|
+
/**
|
|
4646
|
+
* KnownCustomers: generated from openapi.json. See https://clikgate.com/docs/api.
|
|
4647
|
+
*/
|
|
4648
|
+
export class KnownCustomersApi {
|
|
4649
|
+
r;
|
|
4650
|
+
/** @internal */
|
|
4651
|
+
constructor(r) {
|
|
4652
|
+
this.r = r;
|
|
4653
|
+
}
|
|
4654
|
+
/**
|
|
4655
|
+
* Import Known Customers
|
|
4656
|
+
*
|
|
4657
|
+
* `POST /v1/known-customers/import`
|
|
4658
|
+
*
|
|
4659
|
+
* @example
|
|
4660
|
+
* await clikgate.api.knownCustomers.importKnownCustomers({ … });
|
|
4661
|
+
*/
|
|
4662
|
+
async importKnownCustomers(body, options = {}) {
|
|
4663
|
+
const path = `/v1/known-customers/import`;
|
|
4664
|
+
const { data } = await this.r.request({ method: 'POST', path, body, ...options });
|
|
4665
|
+
return data;
|
|
4666
|
+
}
|
|
4667
|
+
/**
|
|
4668
|
+
* Remove Known Customer
|
|
4669
|
+
*
|
|
4670
|
+
* `POST /v1/known-customers/remove`
|
|
4671
|
+
*
|
|
4672
|
+
* @example
|
|
4673
|
+
* await clikgate.api.knownCustomers.removeKnownCustomer({ … });
|
|
4674
|
+
*/
|
|
4675
|
+
async removeKnownCustomer(body, options = {}) {
|
|
4676
|
+
const path = `/v1/known-customers/remove`;
|
|
4677
|
+
const { data } = await this.r.request({ method: 'POST', path, body, ...options });
|
|
4678
|
+
return data;
|
|
4679
|
+
}
|
|
4680
|
+
}
|
|
4617
4681
|
/**
|
|
4618
4682
|
* Leaderboards: generated from openapi.json. See https://clikgate.com/docs/api.
|
|
4619
4683
|
*/
|
|
@@ -6857,6 +6921,19 @@ export class PeopleApi {
|
|
|
6857
6921
|
const { data } = await this.r.request({ method: 'GET', path, ...options });
|
|
6858
6922
|
return data;
|
|
6859
6923
|
}
|
|
6924
|
+
/**
|
|
6925
|
+
* Fetch Person Device Changes
|
|
6926
|
+
*
|
|
6927
|
+
* `GET /v1/people/{person_id}/device-changes`
|
|
6928
|
+
*
|
|
6929
|
+
* @example
|
|
6930
|
+
* await clikgate.api.people.fetchPersonDeviceChanges('<person_id>');
|
|
6931
|
+
*/
|
|
6932
|
+
async fetchPersonDeviceChanges(personId, options = {}) {
|
|
6933
|
+
const path = `/v1/people/${encodePathSegment(personId)}/device-changes`;
|
|
6934
|
+
const { data } = await this.r.request({ method: 'GET', path, ...options });
|
|
6935
|
+
return data;
|
|
6936
|
+
}
|
|
6860
6937
|
/**
|
|
6861
6938
|
* Identify Person
|
|
6862
6939
|
*
|
|
@@ -8668,6 +8745,7 @@ export class ApiClient {
|
|
|
8668
8745
|
inbound;
|
|
8669
8746
|
installs;
|
|
8670
8747
|
jobs;
|
|
8748
|
+
knownCustomers;
|
|
8671
8749
|
leaderboards;
|
|
8672
8750
|
links;
|
|
8673
8751
|
migration;
|
|
@@ -8727,6 +8805,7 @@ export class ApiClient {
|
|
|
8727
8805
|
this.inbound = new InboundApi(r);
|
|
8728
8806
|
this.installs = new InstallsApi(r);
|
|
8729
8807
|
this.jobs = new JobsApi(r);
|
|
8808
|
+
this.knownCustomers = new KnownCustomersApi(r);
|
|
8730
8809
|
this.leaderboards = new LeaderboardsApi(r);
|
|
8731
8810
|
this.links = new LinksApi(r);
|
|
8732
8811
|
this.migration = new MigrationApi(r);
|
package/dist/esm/identity.d.ts
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* person signed in to your app. The app passes the token to the mobile SDK's `identifyUser()`.
|
|
4
4
|
*
|
|
5
5
|
* `token = base64url_nopad(HMAC_SHA256(secret, customerId + "." + issuedAt)) + "." + issuedAt`, the same signer
|
|
6
|
-
* Clikgate verifies with.
|
|
6
|
+
* Clikgate verifies with. With `customerSince` the token is version 2 and also carries the date the
|
|
7
|
+
* person became your customer: `signature.issuedAt.customerSince`. No network call.
|
|
8
|
+
* Guide: https://clikgate.com/docs/identify-users
|
|
7
9
|
*/
|
|
8
10
|
export interface IdentityTokenOptions {
|
|
9
11
|
/** The Clikgate app ID (`app_…`). Picks that app's secret from `identitySecrets` / `CLIKGATE_IDENTITY_SECRETS`. */
|
|
@@ -12,6 +14,11 @@ export interface IdentityTokenOptions {
|
|
|
12
14
|
secret?: string | null;
|
|
13
15
|
/** Unix seconds the token was issued at. Default: now. */
|
|
14
16
|
issuedAt?: number;
|
|
17
|
+
/**
|
|
18
|
+
* When this person became your customer (their account's creation time): a `Date` or Unix seconds. Makes a version 2
|
|
19
|
+
* token, so Clikgate can tell an existing customer from a new one (referrals, new customers). Not in private mode.
|
|
20
|
+
*/
|
|
21
|
+
customerSince?: Date | number | null;
|
|
15
22
|
}
|
|
16
23
|
/** The single secret's environment variable. */
|
|
17
24
|
export declare const IDENTITY_SECRET_ENV = "CLIKGATE_IDENTITY_SECRET";
|
|
@@ -23,10 +30,13 @@ export declare const IDENTITY_SECRETS_ENV = "CLIKGATE_IDENTITY_SECRETS";
|
|
|
23
30
|
* secret from `CLIKGATE_IDENTITY_SECRETS` (a JSON map). No network call; no API key needed.
|
|
24
31
|
*
|
|
25
32
|
* Throws {@link ClikgateServerOnlyError} in a browser or React Native, `ConfigurationError` when no secret is set,
|
|
26
|
-
*
|
|
33
|
+
* `InvalidRequestError` (`invalid_customer_id`) for an empty or over-long customer ID, and `InvalidRequestError`
|
|
34
|
+
* (`invalid_argument`, param `customer_since`) for an account date before 1990 or after the token's issue time.
|
|
27
35
|
*
|
|
28
36
|
* @example
|
|
29
37
|
* import { createIdentityToken } from '@clikgate/node';
|
|
30
38
|
* res.json({ user, clikgateIdentityToken: createIdentityToken(user.id) });
|
|
39
|
+
* // With the account date (version 2), so existing customers are never counted as referrals or new customers:
|
|
40
|
+
* res.json({ user, clikgateIdentityToken: createIdentityToken(user.id, { customerSince: user.createdAt }) });
|
|
31
41
|
*/
|
|
32
42
|
export declare function createIdentityToken(customerId: string, options?: IdentityTokenOptions): string;
|