growsurf-typescript 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/campaign/campaign.d.mts +67 -3
- package/resources/campaign/campaign.d.mts.map +1 -1
- package/resources/campaign/campaign.d.ts +67 -3
- package/resources/campaign/campaign.d.ts.map +1 -1
- package/resources/campaign/campaign.js +27 -0
- package/resources/campaign/campaign.js.map +1 -1
- package/resources/campaign/campaign.mjs +27 -0
- package/resources/campaign/campaign.mjs.map +1 -1
- package/resources/campaign/commission.d.mts.map +1 -1
- package/resources/campaign/commission.d.ts.map +1 -1
- package/resources/campaign/commission.mjs.map +1 -1
- package/resources/campaign/index.d.mts +2 -2
- package/resources/campaign/index.d.mts.map +1 -1
- package/resources/campaign/index.d.ts +2 -2
- package/resources/campaign/index.d.ts.map +1 -1
- package/resources/campaign/index.js.map +1 -1
- package/resources/campaign/index.mjs.map +1 -1
- package/resources/campaign/participant.d.mts +36 -31
- package/resources/campaign/participant.d.mts.map +1 -1
- package/resources/campaign/participant.d.ts +36 -31
- package/resources/campaign/participant.d.ts.map +1 -1
- package/resources/campaign/participant.js +2 -17
- package/resources/campaign/participant.js.map +1 -1
- package/resources/campaign/participant.mjs +2 -17
- package/resources/campaign/participant.mjs.map +1 -1
- package/resources/campaign/reward.d.mts.map +1 -1
- package/resources/campaign/reward.d.ts.map +1 -1
- package/resources/campaign/reward.mjs.map +1 -1
- package/resources/campaign.d.mts.map +1 -1
- package/resources/campaign.d.ts.map +1 -1
- package/resources/campaign.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/campaign/campaign.ts +86 -4
- package/src/resources/campaign/index.ts +3 -2
- package/src/resources/campaign/participant.ts +45 -43
- package/src/resources/index.ts +2 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -93,6 +93,8 @@ export class ParticipantResource extends APIResource {
|
|
|
93
93
|
* companyName: 'Hooli',
|
|
94
94
|
* industry: 'Software',
|
|
95
95
|
* },
|
|
96
|
+
* mobileInstanceId:
|
|
97
|
+
* '5f7d0f4c-3e7c-4aa9-8c41-d81d998f0bb1',
|
|
96
98
|
* referredBy: 'richard-h8kp6l',
|
|
97
99
|
* },
|
|
98
100
|
* );
|
|
@@ -102,28 +104,6 @@ export class ParticipantResource extends APIResource {
|
|
|
102
104
|
return this._client.post(path`/campaign/${id}/participant`, { body, ...options });
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
/**
|
|
106
|
-
* Creates a participant-scoped token for GrowSurf mobile SDK participant
|
|
107
|
-
* endpoints. The program must have mobile SDK access enabled.
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```ts
|
|
111
|
-
* const response =
|
|
112
|
-
* await client.campaign.participant.createMobileToken(
|
|
113
|
-
* 'participantIdOrEmail',
|
|
114
|
-
* { id: 'id' },
|
|
115
|
-
* );
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
createMobileToken(
|
|
119
|
-
participantIDOrEmail: string,
|
|
120
|
-
params: ParticipantCreateMobileTokenParams,
|
|
121
|
-
options?: RequestOptions,
|
|
122
|
-
): APIPromise<ParticipantCreateMobileTokenResponse> {
|
|
123
|
-
const { id } = params;
|
|
124
|
-
return this._client.post(path`/campaign/${id}/participant/${participantIDOrEmail}/mobile-token`, options);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
107
|
/**
|
|
128
108
|
* Retrieves a paged list of commissions earned by a participant.
|
|
129
109
|
*
|
|
@@ -306,6 +286,36 @@ export class ParticipantResource extends APIResource {
|
|
|
306
286
|
}
|
|
307
287
|
}
|
|
308
288
|
|
|
289
|
+
export interface Create {
|
|
290
|
+
email: string;
|
|
291
|
+
|
|
292
|
+
fingerprint?: string;
|
|
293
|
+
|
|
294
|
+
firstName?: string;
|
|
295
|
+
|
|
296
|
+
ipAddress?: string;
|
|
297
|
+
|
|
298
|
+
lastName?: string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Shallow custom metadata object.
|
|
302
|
+
*/
|
|
303
|
+
metadata?: { [key: string]: unknown };
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Optional app-install scoped identifier for native mobile anti-fraud. Recommended
|
|
307
|
+
* for mobile participant creation and mobile participant token flows.
|
|
308
|
+
*/
|
|
309
|
+
mobileInstanceId?: string;
|
|
310
|
+
|
|
311
|
+
referralStatus?: 'CREDIT_PENDING' | 'CREDIT_AWARDED';
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Referrer participant ID or email address.
|
|
315
|
+
*/
|
|
316
|
+
referredBy?: string;
|
|
317
|
+
}
|
|
318
|
+
|
|
309
319
|
export type FraudRiskLevel = 'LOW' | 'MEDIUM' | 'HIGH';
|
|
310
320
|
|
|
311
321
|
export interface Participant {
|
|
@@ -354,6 +364,12 @@ export interface Participant {
|
|
|
354
364
|
*/
|
|
355
365
|
metadata?: { [key: string]: unknown };
|
|
356
366
|
|
|
367
|
+
/**
|
|
368
|
+
* App-install scoped mobile identifier used for anti-fraud matching when provided
|
|
369
|
+
* by native mobile apps. Not stored when strict GDPR/CCPA mode is enabled.
|
|
370
|
+
*/
|
|
371
|
+
mobileInstanceId?: string | null;
|
|
372
|
+
|
|
357
373
|
monthlyReferrals?: Array<string>;
|
|
358
374
|
|
|
359
375
|
notes?: string | null;
|
|
@@ -484,18 +500,6 @@ export interface ParticipantDeleteResponse {
|
|
|
484
500
|
success: boolean;
|
|
485
501
|
}
|
|
486
502
|
|
|
487
|
-
export interface ParticipantCreateMobileTokenResponse {
|
|
488
|
-
/**
|
|
489
|
-
* Token lifetime in seconds.
|
|
490
|
-
*/
|
|
491
|
-
expiresIn: number;
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Participant-scoped bearer token for GrowSurf mobile SDK participant endpoints.
|
|
495
|
-
*/
|
|
496
|
-
participantToken: string;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
503
|
export interface ParticipantListRewardsResponse {
|
|
500
504
|
limit: number;
|
|
501
505
|
|
|
@@ -625,6 +629,12 @@ export interface ParticipantAddParams {
|
|
|
625
629
|
*/
|
|
626
630
|
metadata?: { [key: string]: unknown };
|
|
627
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Optional app-install scoped identifier for native mobile anti-fraud. Recommended
|
|
634
|
+
* for mobile participant creation and mobile participant token flows.
|
|
635
|
+
*/
|
|
636
|
+
mobileInstanceId?: string;
|
|
637
|
+
|
|
628
638
|
referralStatus?: 'CREDIT_PENDING' | 'CREDIT_AWARDED';
|
|
629
639
|
|
|
630
640
|
/**
|
|
@@ -633,13 +643,6 @@ export interface ParticipantAddParams {
|
|
|
633
643
|
referredBy?: string;
|
|
634
644
|
}
|
|
635
645
|
|
|
636
|
-
export interface ParticipantCreateMobileTokenParams {
|
|
637
|
-
/**
|
|
638
|
-
* GrowSurf program ID.
|
|
639
|
-
*/
|
|
640
|
-
id: string;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
646
|
export interface ParticipantListCommissionsParams {
|
|
644
647
|
/**
|
|
645
648
|
* Path param: GrowSurf program ID.
|
|
@@ -913,13 +916,13 @@ export interface ParticipantTriggerReferralParams {
|
|
|
913
916
|
|
|
914
917
|
export declare namespace ParticipantResource {
|
|
915
918
|
export {
|
|
919
|
+
type Create as Create,
|
|
916
920
|
type FraudRiskLevel as FraudRiskLevel,
|
|
917
921
|
type Participant as Participant,
|
|
918
922
|
type ParticipantReward as ParticipantReward,
|
|
919
923
|
type ReferralSource as ReferralSource,
|
|
920
924
|
type ReferralStatus as ReferralStatus,
|
|
921
925
|
type ParticipantDeleteResponse as ParticipantDeleteResponse,
|
|
922
|
-
type ParticipantCreateMobileTokenResponse as ParticipantCreateMobileTokenResponse,
|
|
923
926
|
type ParticipantListRewardsResponse as ParticipantListRewardsResponse,
|
|
924
927
|
type ParticipantRecordTransactionResponse as ParticipantRecordTransactionResponse,
|
|
925
928
|
type ParticipantSendInvitesResponse as ParticipantSendInvitesResponse,
|
|
@@ -928,7 +931,6 @@ export declare namespace ParticipantResource {
|
|
|
928
931
|
type ParticipantUpdateParams as ParticipantUpdateParams,
|
|
929
932
|
type ParticipantDeleteParams as ParticipantDeleteParams,
|
|
930
933
|
type ParticipantAddParams as ParticipantAddParams,
|
|
931
|
-
type ParticipantCreateMobileTokenParams as ParticipantCreateMobileTokenParams,
|
|
932
934
|
type ParticipantListCommissionsParams as ParticipantListCommissionsParams,
|
|
933
935
|
type ParticipantListPayoutsParams as ParticipantListPayoutsParams,
|
|
934
936
|
type ParticipantListReferralsParams as ParticipantListReferralsParams,
|
package/src/resources/index.ts
CHANGED
|
@@ -9,7 +9,9 @@ export {
|
|
|
9
9
|
type ParticipantPayoutList,
|
|
10
10
|
type ReferralList,
|
|
11
11
|
type CampaignListResponse,
|
|
12
|
+
type CampaignCreateMobileParticipantTokenResponse,
|
|
12
13
|
type CampaignRetrieveAnalyticsResponse,
|
|
14
|
+
type CampaignCreateMobileParticipantTokenParams,
|
|
13
15
|
type CampaignListCommissionsParams,
|
|
14
16
|
type CampaignListLeaderboardParams,
|
|
15
17
|
type CampaignListParticipantsParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.4.0'; // x-release-please-version
|
package/uploads.d.mts
CHANGED
package/uploads.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
|
package/uploads.d.ts
CHANGED
package/uploads.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
|
package/uploads.mjs
CHANGED
package/uploads.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.4.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|