Skip to content

Commit 7b9b59b

Browse files
authored
🤖 Merge PR DefinitelyTyped#72429 mparticle web sdk - fix useridentities and mpconfiguration types by @rmi22186
1 parent 8ecb867 commit 7b9b59b

File tree

3 files changed

+43
-25
lines changed

3 files changed

+43
-25
lines changed

‎types/mparticle__web-sdk/index.d.ts‎

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ export interface MPConfiguration {
2323
cookieDomain?: string | undefined;
2424
customFlags?: SDKEventCustomFlags | undefined;
2525
sideloadedKits?: MPForwarder[];
26+
v1SecureServiceUrl?: string | undefined;
27+
v2SecureServiceUrl?: string | undefined;
28+
v3SecureServiceUrl?: string | undefined;
29+
configUrl?: string | undefined;
30+
identityUrl?: string | undefined;
31+
aliasUrl?: string | undefined;
2632
/**
2733
* @warning only change workspaceToken if you are absolutely sure you know what you are doing
2834
*/
@@ -515,27 +521,27 @@ export interface User {
515521
export type UserAttributesValue = string | number | boolean | null;
516522
export type AllUserAttributes = Record<string, UserAttributesValue | UserAttributesValue[]>;
517523
export interface UserIdentities {
518-
customerid?: string | undefined;
519-
email?: string | undefined;
520-
other?: string | undefined;
521-
other2?: string | undefined;
522-
other3?: string | undefined;
523-
other4?: string | undefined;
524-
other5?: string | undefined;
525-
other6?: string | undefined;
526-
other7?: string | undefined;
527-
other8?: string | undefined;
528-
other9?: string | undefined;
529-
other10?: string | undefined;
530-
mobile_number?: string | undefined;
531-
phone_number_2?: string | undefined;
532-
phone_number_3?: string | undefined;
533-
facebook?: string | undefined;
534-
facebookcustomaudienceid?: string | undefined;
535-
google?: string | undefined;
536-
twitter?: string | undefined;
537-
microsoft?: string | undefined;
538-
yahoo?: string | undefined;
524+
customerid?: string | null;
525+
email?: string | null;
526+
other?: string | null;
527+
other2?: string | null;
528+
other3?: string | null;
529+
other4?: string | null;
530+
other5?: string | null;
531+
other6?: string | null;
532+
other7?: string | null;
533+
other8?: string | null;
534+
other9?: string | null;
535+
other10?: string | null;
536+
mobile_number?: string | null;
537+
phone_number_2?: string | null;
538+
phone_number_3?: string | null;
539+
facebook?: string | null;
540+
facebookcustomaudienceid?: string | null;
541+
google?: string | null;
542+
twitter?: string | null;
543+
microsoft?: string | null;
544+
yahoo?: string | null;
539545
}
540546

541547
interface Cart {

‎types/mparticle__web-sdk/test/mparticle__web-sdk-instance-tests.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ const identifyRequest: mParticle.IdentifyRequest = {
4949
facebookcustomaudienceid: "test",
5050
google: "test",
5151
twitter: "test",
52-
microsoft: "test",
53-
yahoo: "test",
52+
microsoft: null,
53+
yahoo: null,
5454
},
5555
};
5656

@@ -122,6 +122,12 @@ const config: mParticle.MPConfiguration = {
122122
anotherFlag: "bar",
123123
},
124124
sideloadedKits: [{}, {}],
125+
v1SecureServiceUrl: "mp.mydomain.com/webevents/v1/JS/",
126+
v2SecureServiceUrl: "mp.mydomain.com/webevents/v2/JS/",
127+
v3SecureServiceUrl: "mp.mydomain.com/webevents/v3/JS/",
128+
configUrl: "mp.mydomain.com/tags/JS/v2/",
129+
identityUrl: "mp.mydomain.com/identity/v1/",
130+
aliasUrl: "mp.mydomain.com/webevents/v1/identity/",
125131
};
126132

127133
instance.endSession();

‎types/mparticle__web-sdk/test/mparticle__web-sdk-tests.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ const identifyRequest: mParticle.IdentifyRequest = {
4747
facebookcustomaudienceid: "test",
4848
google: "test",
4949
twitter: "test",
50-
microsoft: "test",
51-
yahoo: "test",
50+
microsoft: null,
51+
yahoo: null,
5252
},
5353
};
5454

@@ -120,6 +120,12 @@ const config: mParticle.MPConfiguration = {
120120
anotherFlag: "bar",
121121
},
122122
sideloadedKits: [{}, {}],
123+
v1SecureServiceUrl: "mp.mydomain.com/webevents/v1/JS/",
124+
v2SecureServiceUrl: "mp.mydomain.com/webevents/v2/JS/",
125+
v3SecureServiceUrl: "mp.mydomain.com/webevents/v3/JS/",
126+
configUrl: "mp.mydomain.com/tags/JS/v2/",
127+
identityUrl: "mp.mydomain.com/identity/v1/",
128+
aliasUrl: "mp.mydomain.com/webevents/v1/identity/",
123129
};
124130

125131
mParticle.endSession();

0 commit comments

Comments
 (0)