@vrplatform/log 2.0.0-alpha.35 → 2.0.0-alpha.37
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/build/main/tracking/index.d.ts +32 -11
- package/build/main/tracking/index.js +1 -0
- package/build/main/tracking/index.js.map +1 -1
- package/build/module/tracking/index.d.ts +32 -11
- package/build/module/tracking/index.js +1 -0
- package/build/module/tracking/index.js.map +1 -1
- package/package.json +1 -1
- package/src/tracking/index.ts +32 -11
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
declare module 'intercom-client' {
|
|
2
2
|
namespace Intercom {
|
|
3
|
+
interface CreateContactRequestWithExternalId {
|
|
4
|
+
/** A unique identifier for the contact which is given to Intercom */
|
|
5
|
+
external_id: string;
|
|
6
|
+
/** The contacts phone */
|
|
7
|
+
phone?: string;
|
|
8
|
+
/** The contacts name */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** An image URL containing the avatar of a contact */
|
|
11
|
+
avatar?: string;
|
|
12
|
+
/** The time specified for when a contact signed up */
|
|
13
|
+
signed_up_at?: number;
|
|
14
|
+
/** The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually) */
|
|
15
|
+
last_seen_at?: number;
|
|
16
|
+
/** The id of an admin that has been assigned account ownership of the contact */
|
|
17
|
+
owner_id?: number;
|
|
18
|
+
/** Whether the contact is unsubscribed from emails */
|
|
19
|
+
unsubscribed_from_emails?: boolean;
|
|
20
|
+
/** The custom attributes which are set for the contact */
|
|
21
|
+
custom_attributes?: ContactCustomAttributes;
|
|
22
|
+
}
|
|
3
23
|
interface UpdateContactRequest {
|
|
4
24
|
/** The role of the contact. */
|
|
5
25
|
role?: string;
|
|
@@ -22,7 +42,15 @@ declare module 'intercom-client' {
|
|
|
22
42
|
/** Whether the contact is unsubscribed from emails */
|
|
23
43
|
unsubscribed_from_emails?: boolean;
|
|
24
44
|
/** The custom attributes which are set for the contact */
|
|
25
|
-
custom_attributes?:
|
|
45
|
+
custom_attributes?: ContactCustomAttributes;
|
|
46
|
+
}
|
|
47
|
+
interface ContactCustomAttributes {
|
|
48
|
+
article_id?: string;
|
|
49
|
+
workflowInstanceId?: number;
|
|
50
|
+
Onboarding_Support?: string;
|
|
51
|
+
Active_Listings?: string;
|
|
52
|
+
Accounting_Software?: string;
|
|
53
|
+
userType?: string;
|
|
26
54
|
}
|
|
27
55
|
interface CreateOrUpdateCompanyRequest {
|
|
28
56
|
/** The name of the Company */
|
|
@@ -38,21 +66,13 @@ declare module 'intercom-client' {
|
|
|
38
66
|
/** The industry that this company operates in. */
|
|
39
67
|
industry?: string;
|
|
40
68
|
/** A hash of key/value pairs containing any other data about the company you want Intercom to store. */
|
|
41
|
-
custom_attributes?:
|
|
69
|
+
custom_attributes?: CompanyCustomAttributes;
|
|
42
70
|
/** The time the company was created by you. */
|
|
43
71
|
remote_created_at?: number;
|
|
44
72
|
/** How much revenue the company generates for your business. Note that this will truncate floats. i.e. it only allow for whole integers, 155.98 will be truncated to 155. Note that this has an upper limit of 2\*\*31-1 or 2147483647.. */
|
|
45
73
|
monthly_spend?: number;
|
|
46
74
|
}
|
|
47
|
-
interface
|
|
48
|
-
article_id?: string;
|
|
49
|
-
workflowInstanceId?: number;
|
|
50
|
-
Onboarding_Support?: string;
|
|
51
|
-
Active_Listings?: string;
|
|
52
|
-
Accounting_Software?: string;
|
|
53
|
-
userType?: string;
|
|
54
|
-
}
|
|
55
|
-
interface IntercomCompanyCustomAttributes {
|
|
75
|
+
interface CompanyCustomAttributes {
|
|
56
76
|
teamId?: string;
|
|
57
77
|
team?: string;
|
|
58
78
|
type?: string;
|
|
@@ -75,6 +95,7 @@ import { PostHog } from 'posthog-node';
|
|
|
75
95
|
import { type WorkerLog } from '../log';
|
|
76
96
|
import type { GroupProps, IdentifyProps, TrackProps, TrackingProps } from './types';
|
|
77
97
|
export * from './types';
|
|
98
|
+
export * from 'intercom-client';
|
|
78
99
|
export type Tracking = ReturnType<typeof useTracking>;
|
|
79
100
|
export declare const useTracking: ({ dataset, env, name }: TrackingProps, isDev?: boolean) => {
|
|
80
101
|
track: (props: TrackProps) => Promise<void>;
|
|
@@ -23,6 +23,7 @@ const log_1 = require("../log");
|
|
|
23
23
|
const utils_1 = require("../utils");
|
|
24
24
|
const convertValuesToString_1 = require("../utils/convertValuesToString");
|
|
25
25
|
__exportStar(require("./types"), exports);
|
|
26
|
+
__exportStar(require("intercom-client"), exports);
|
|
26
27
|
const useTracking = ({ dataset, env, name }, isDev) => {
|
|
27
28
|
const log = (0, log_1.useLog)({ name, dataset, env });
|
|
28
29
|
const intercom = env.INTERCOM_TOKEN
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["tracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["tracking/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmGA,4DAAoD;AACpD,qDAA2D;AAC3D,kEAA+D;AAC/D,+CAAuC;AACvC,gCAAgD;AAChD,oCAA0D;AAC1D,0EAAuE;AAQvE,0CAAwB;AACxB,kDAAgC;AAIzB,MAAM,WAAW,GAAG,CACzB,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAiB,EACrC,KAAe,EAUf,EAAE;IACF,MAAM,GAAG,GAAG,IAAA,YAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAE3C,MAAM,QAAQ,GAAG,GAAG,CAAC,cAAc;QACjC,CAAC,CAAC,IAAI,gCAAc,CAAC;YACjB,KAAK,EAAE,GAAG,CAAC,cAAc;YACzB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,IAAA,iBAAO,EAAC;gBACN,GAAG,IAAI;gBACP,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE;aACzD,CAAC;SACL,CAAC;Q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C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAC9B,CAAC;YACJ,CAAC;QACH,CAAC;QACD,QAAQ,EAAE,KAAK,IAAI,EAAE,CACnB,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;QACzE,sBAAsB;QACtB,QAAQ;QACR,OAAO;QACP,IAAI;QACJ,GAAG;KACJ,CAAC;AACJ,CAAC,CAAC;AAjLW,QAAA,WAAW,eAiLtB"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
declare module 'intercom-client' {
|
|
2
2
|
namespace Intercom {
|
|
3
|
+
interface CreateContactRequestWithExternalId {
|
|
4
|
+
/** A unique identifier for the contact which is given to Intercom */
|
|
5
|
+
external_id: string;
|
|
6
|
+
/** The contacts phone */
|
|
7
|
+
phone?: string;
|
|
8
|
+
/** The contacts name */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** An image URL containing the avatar of a contact */
|
|
11
|
+
avatar?: string;
|
|
12
|
+
/** The time specified for when a contact signed up */
|
|
13
|
+
signed_up_at?: number;
|
|
14
|
+
/** The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually) */
|
|
15
|
+
last_seen_at?: number;
|
|
16
|
+
/** The id of an admin that has been assigned account ownership of the contact */
|
|
17
|
+
owner_id?: number;
|
|
18
|
+
/** Whether the contact is unsubscribed from emails */
|
|
19
|
+
unsubscribed_from_emails?: boolean;
|
|
20
|
+
/** The custom attributes which are set for the contact */
|
|
21
|
+
custom_attributes?: ContactCustomAttributes;
|
|
22
|
+
}
|
|
3
23
|
interface UpdateContactRequest {
|
|
4
24
|
/** The role of the contact. */
|
|
5
25
|
role?: string;
|
|
@@ -22,7 +42,15 @@ declare module 'intercom-client' {
|
|
|
22
42
|
/** Whether the contact is unsubscribed from emails */
|
|
23
43
|
unsubscribed_from_emails?: boolean;
|
|
24
44
|
/** The custom attributes which are set for the contact */
|
|
25
|
-
custom_attributes?:
|
|
45
|
+
custom_attributes?: ContactCustomAttributes;
|
|
46
|
+
}
|
|
47
|
+
interface ContactCustomAttributes {
|
|
48
|
+
article_id?: string;
|
|
49
|
+
workflowInstanceId?: number;
|
|
50
|
+
Onboarding_Support?: string;
|
|
51
|
+
Active_Listings?: string;
|
|
52
|
+
Accounting_Software?: string;
|
|
53
|
+
userType?: string;
|
|
26
54
|
}
|
|
27
55
|
interface CreateOrUpdateCompanyRequest {
|
|
28
56
|
/** The name of the Company */
|
|
@@ -38,21 +66,13 @@ declare module 'intercom-client' {
|
|
|
38
66
|
/** The industry that this company operates in. */
|
|
39
67
|
industry?: string;
|
|
40
68
|
/** A hash of key/value pairs containing any other data about the company you want Intercom to store. */
|
|
41
|
-
custom_attributes?:
|
|
69
|
+
custom_attributes?: CompanyCustomAttributes;
|
|
42
70
|
/** The time the company was created by you. */
|
|
43
71
|
remote_created_at?: number;
|
|
44
72
|
/** How much revenue the company generates for your business. Note that this will truncate floats. i.e. it only allow for whole integers, 155.98 will be truncated to 155. Note that this has an upper limit of 2\*\*31-1 or 2147483647.. */
|
|
45
73
|
monthly_spend?: number;
|
|
46
74
|
}
|
|
47
|
-
interface
|
|
48
|
-
article_id?: string;
|
|
49
|
-
workflowInstanceId?: number;
|
|
50
|
-
Onboarding_Support?: string;
|
|
51
|
-
Active_Listings?: string;
|
|
52
|
-
Accounting_Software?: string;
|
|
53
|
-
userType?: string;
|
|
54
|
-
}
|
|
55
|
-
interface IntercomCompanyCustomAttributes {
|
|
75
|
+
interface CompanyCustomAttributes {
|
|
56
76
|
teamId?: string;
|
|
57
77
|
team?: string;
|
|
58
78
|
type?: string;
|
|
@@ -75,6 +95,7 @@ import { PostHog } from 'posthog-node';
|
|
|
75
95
|
import { type WorkerLog } from '../log';
|
|
76
96
|
import type { GroupProps, IdentifyProps, TrackProps, TrackingProps } from './types';
|
|
77
97
|
export * from './types';
|
|
98
|
+
export * from 'intercom-client';
|
|
78
99
|
export type Tracking = ReturnType<typeof useTracking>;
|
|
79
100
|
export declare const useTracking: ({ dataset, env, name }: TrackingProps, isDev?: boolean) => {
|
|
80
101
|
track: (props: TrackProps) => Promise<void>;
|
|
@@ -6,6 +6,7 @@ import { useLog } from '../log';
|
|
|
6
6
|
import { convertKeysToSnakeCase, isTest } from '../utils';
|
|
7
7
|
import { convertValuesToString } from '../utils/convertValuesToString';
|
|
8
8
|
export * from './types';
|
|
9
|
+
export * from 'intercom-client';
|
|
9
10
|
export const useTracking = ({ dataset, env, name }, isDev) => {
|
|
10
11
|
const log = useLog({ name, dataset, env });
|
|
11
12
|
const intercom = env.INTERCOM_TOKEN
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["tracking/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["tracking/index.ts"],"names":[],"mappings":"AAmGA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAkB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAQvE,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAIhC,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAiB,EACrC,KAAe,EAUf,EAAE;IACF,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,E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jB,SAAS,EAAE,QAAQ;oBACnB,UAAU,EAAE,sBAAsB,CAAC,MAAM,CAAC;oBAC1C,UAAU,EAAE,MAAM;iBACnB,CAAC,CAAC;gBAEH,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAC1D,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAC9B,CAAC;YACJ,CAAC;QACH,CAAC;QACD,QAAQ,EAAE,KAAK,IAAI,EAAE,CACnB,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;QACzE,sBAAsB;QACtB,QAAQ;QACR,OAAO;QACP,IAAI;QACJ,GAAG;KACJ,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/tracking/index.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
declare module 'intercom-client' {
|
|
2
2
|
export namespace Intercom {
|
|
3
|
+
export interface CreateContactRequestWithExternalId {
|
|
4
|
+
/** A unique identifier for the contact which is given to Intercom */
|
|
5
|
+
external_id: string;
|
|
6
|
+
/** The contacts phone */
|
|
7
|
+
phone?: string;
|
|
8
|
+
/** The contacts name */
|
|
9
|
+
name?: string;
|
|
10
|
+
/** An image URL containing the avatar of a contact */
|
|
11
|
+
avatar?: string;
|
|
12
|
+
/** The time specified for when a contact signed up */
|
|
13
|
+
signed_up_at?: number;
|
|
14
|
+
/** The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually) */
|
|
15
|
+
last_seen_at?: number;
|
|
16
|
+
/** The id of an admin that has been assigned account ownership of the contact */
|
|
17
|
+
owner_id?: number;
|
|
18
|
+
/** Whether the contact is unsubscribed from emails */
|
|
19
|
+
unsubscribed_from_emails?: boolean;
|
|
20
|
+
/** The custom attributes which are set for the contact */
|
|
21
|
+
custom_attributes?: ContactCustomAttributes;
|
|
22
|
+
}
|
|
3
23
|
interface UpdateContactRequest {
|
|
4
24
|
/** The role of the contact. */
|
|
5
25
|
role?: string;
|
|
@@ -22,7 +42,15 @@ declare module 'intercom-client' {
|
|
|
22
42
|
/** Whether the contact is unsubscribed from emails */
|
|
23
43
|
unsubscribed_from_emails?: boolean;
|
|
24
44
|
/** The custom attributes which are set for the contact */
|
|
25
|
-
custom_attributes?:
|
|
45
|
+
custom_attributes?: ContactCustomAttributes;
|
|
46
|
+
}
|
|
47
|
+
interface ContactCustomAttributes {
|
|
48
|
+
article_id?: string; // undefined
|
|
49
|
+
workflowInstanceId?: number; // undefined
|
|
50
|
+
Onboarding_Support?: string; // The customer's preferred onboarding level
|
|
51
|
+
Active_Listings?: string; // The number of active listings a user has
|
|
52
|
+
Accounting_Software?: string; // The client's accounting software
|
|
53
|
+
userType?: string; // User Type (user or owner)
|
|
26
54
|
}
|
|
27
55
|
interface CreateOrUpdateCompanyRequest {
|
|
28
56
|
/** The name of the Company */
|
|
@@ -38,21 +66,13 @@ declare module 'intercom-client' {
|
|
|
38
66
|
/** The industry that this company operates in. */
|
|
39
67
|
industry?: string;
|
|
40
68
|
/** A hash of key/value pairs containing any other data about the company you want Intercom to store. */
|
|
41
|
-
custom_attributes?:
|
|
69
|
+
custom_attributes?: CompanyCustomAttributes;
|
|
42
70
|
/** The time the company was created by you. */
|
|
43
71
|
remote_created_at?: number;
|
|
44
72
|
/** How much revenue the company generates for your business. Note that this will truncate floats. i.e. it only allow for whole integers, 155.98 will be truncated to 155. Note that this has an upper limit of 2\*\*31-1 or 2147483647.. */
|
|
45
73
|
monthly_spend?: number;
|
|
46
74
|
}
|
|
47
|
-
interface
|
|
48
|
-
article_id?: string; // undefined
|
|
49
|
-
workflowInstanceId?: number; // undefined
|
|
50
|
-
Onboarding_Support?: string; // The customer's preferred onboarding level
|
|
51
|
-
Active_Listings?: string; // The number of active listings a user has
|
|
52
|
-
Accounting_Software?: string; // The client's accounting software
|
|
53
|
-
userType?: string; // User Type (user or owner)
|
|
54
|
-
}
|
|
55
|
-
interface IntercomCompanyCustomAttributes {
|
|
75
|
+
interface CompanyCustomAttributes {
|
|
56
76
|
teamId?: string; // undefined
|
|
57
77
|
team?: string; // undefined
|
|
58
78
|
type?: string; // undefined
|
|
@@ -92,6 +112,7 @@ import type {
|
|
|
92
112
|
} from './types';
|
|
93
113
|
|
|
94
114
|
export * from './types';
|
|
115
|
+
export * from 'intercom-client';
|
|
95
116
|
|
|
96
117
|
export type Tracking = ReturnType<typeof useTracking>;
|
|
97
118
|
|