@segment/action-destinations 3.126.1-wasilogtest.0 → 3.127.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.
Files changed (67) hide show
  1. package/dist/destinations/heap/index.js +1 -1
  2. package/dist/destinations/heap/index.js.map +1 -1
  3. package/dist/destinations/heap/trackEvent/generated-types.d.ts +3 -1
  4. package/dist/destinations/heap/trackEvent/index.js +32 -5
  5. package/dist/destinations/heap/trackEvent/index.js.map +1 -1
  6. package/dist/destinations/hubspot/helperFunctions.d.ts +7 -0
  7. package/dist/destinations/hubspot/helperFunctions.js +27 -0
  8. package/dist/destinations/hubspot/helperFunctions.js.map +1 -0
  9. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js +2 -1
  10. package/dist/destinations/hubspot/sendCustomBehavioralEvent/index.js.map +1 -1
  11. package/dist/destinations/hubspot/upsertCompany/index.js +4 -7
  12. package/dist/destinations/hubspot/upsertCompany/index.js.map +1 -1
  13. package/dist/destinations/hubspot/upsertContact/index.js +4 -7
  14. package/dist/destinations/hubspot/upsertContact/index.js.map +1 -1
  15. package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js +2 -1
  16. package/dist/destinations/hubspot/upsertCustomObjectRecord/index.js.map +1 -1
  17. package/dist/destinations/index.js +1 -0
  18. package/dist/destinations/index.js.map +1 -1
  19. package/dist/destinations/ironclad/RecordAction/generated-types.d.ts +12 -0
  20. package/dist/destinations/ironclad/RecordAction/generated-types.js +3 -0
  21. package/dist/destinations/ironclad/RecordAction/generated-types.js.map +1 -0
  22. package/dist/destinations/ironclad/RecordAction/index.d.ts +5 -0
  23. package/dist/destinations/ironclad/RecordAction/index.js +117 -0
  24. package/dist/destinations/ironclad/RecordAction/index.js.map +1 -0
  25. package/dist/destinations/ironclad/generated-types.d.ts +5 -0
  26. package/dist/destinations/ironclad/generated-types.js +3 -0
  27. package/dist/destinations/ironclad/generated-types.js.map +1 -0
  28. package/dist/destinations/ironclad/index.d.ts +4 -0
  29. package/dist/destinations/ironclad/index.js +42 -0
  30. package/dist/destinations/ironclad/index.js.map +1 -0
  31. package/dist/destinations/ripe/generated-types.d.ts +4 -0
  32. package/dist/destinations/ripe/generated-types.js +3 -0
  33. package/dist/destinations/ripe/generated-types.js.map +1 -0
  34. package/dist/destinations/ripe/group/generated-types.d.ts +10 -0
  35. package/dist/destinations/ripe/group/generated-types.js +3 -0
  36. package/dist/destinations/ripe/group/generated-types.js.map +1 -0
  37. package/dist/destinations/ripe/group/index.d.ts +5 -0
  38. package/dist/destinations/ripe/group/index.js +68 -0
  39. package/dist/destinations/ripe/group/index.js.map +1 -0
  40. package/dist/destinations/ripe/identify/generated-types.d.ts +10 -0
  41. package/dist/destinations/ripe/identify/generated-types.js +3 -0
  42. package/dist/destinations/ripe/identify/generated-types.js.map +1 -0
  43. package/dist/destinations/ripe/identify/index.d.ts +5 -0
  44. package/dist/destinations/ripe/identify/index.js +70 -0
  45. package/dist/destinations/ripe/identify/index.js.map +1 -0
  46. package/dist/destinations/ripe/index.d.ts +4 -0
  47. package/dist/destinations/ripe/index.js +83 -0
  48. package/dist/destinations/ripe/index.js.map +1 -0
  49. package/dist/destinations/ripe/page/generated-types.d.ts +16 -0
  50. package/dist/destinations/ripe/page/generated-types.js +3 -0
  51. package/dist/destinations/ripe/page/generated-types.js.map +1 -0
  52. package/dist/destinations/ripe/page/index.d.ts +5 -0
  53. package/dist/destinations/ripe/page/index.js +153 -0
  54. package/dist/destinations/ripe/page/index.js.map +1 -0
  55. package/dist/destinations/ripe/track/generated-types.d.ts +11 -0
  56. package/dist/destinations/ripe/track/generated-types.js +3 -0
  57. package/dist/destinations/ripe/track/generated-types.js.map +1 -0
  58. package/dist/destinations/ripe/track/index.d.ts +5 -0
  59. package/dist/destinations/ripe/track/index.js +79 -0
  60. package/dist/destinations/ripe/track/index.js.map +1 -0
  61. package/dist/destinations/salesforce/lead/index.js +6 -6
  62. package/dist/destinations/salesforce/lead/index.js.map +1 -1
  63. package/dist/destinations/segment-profiles/properties.js +0 -6
  64. package/dist/destinations/segment-profiles/properties.js.map +1 -1
  65. package/dist/destinations/segment-profiles/segment-properties.js +1 -1
  66. package/dist/destinations/segment-profiles/segment-properties.js.map +1 -1
  67. package/package.json +4 -4
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ anonymousId?: string | null;
3
+ userId?: string | null;
4
+ groupId: string;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ } | null;
8
+ timestamp?: string;
9
+ messageId?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/group/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Group',
5
+ description: 'Group user in Ripe',
6
+ defaultSubscription: 'type = "group"',
7
+ fields: {
8
+ anonymousId: {
9
+ type: 'string',
10
+ allowNull: true,
11
+ description: 'Anonymous id',
12
+ label: 'Anonymous ID',
13
+ default: { '@path': '$.anonymousId' }
14
+ },
15
+ userId: {
16
+ type: 'string',
17
+ allowNull: true,
18
+ description: 'The ID associated with the user',
19
+ label: 'User ID',
20
+ default: { '@path': '$.userId' }
21
+ },
22
+ groupId: {
23
+ type: 'string',
24
+ required: true,
25
+ description: 'The group id',
26
+ label: 'Group ID',
27
+ default: { '@path': '$.groupId' }
28
+ },
29
+ traits: {
30
+ type: 'object',
31
+ label: 'Traits',
32
+ description: 'Traits to associate with the group',
33
+ allowNull: true,
34
+ default: { '@path': '$.traits' }
35
+ },
36
+ timestamp: {
37
+ type: 'string',
38
+ format: 'date-time',
39
+ required: false,
40
+ description: 'The timestamp of the event',
41
+ label: 'Timestamp',
42
+ default: { '@path': '$.timestamp' }
43
+ },
44
+ messageId: {
45
+ type: 'string',
46
+ format: 'uuid',
47
+ required: false,
48
+ description: 'The Segment messageId',
49
+ label: 'MessageId',
50
+ default: { '@path': '$messageId' }
51
+ }
52
+ },
53
+ perform: (request, { payload, settings }) => {
54
+ return request(`${settings.endpoint}/group`, {
55
+ method: 'post',
56
+ json: {
57
+ anonymousId: payload.anonymousId,
58
+ userId: payload.userId,
59
+ groupId: payload.groupId,
60
+ traits: payload.traits,
61
+ messageId: payload.messageId,
62
+ timestamp: payload.timestamp ?? new Date()
63
+ }
64
+ });
65
+ }
66
+ };
67
+ exports.default = action;
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/group/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,oBAAoB;IACjC,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;SAClC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,oCAAoC;YACjD,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,4BAA4B;YACzC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,uBAAuB;YACpC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;SACnC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,OAAO,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,QAAQ,EAAE;YAC3C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,10 @@
1
+ export interface Payload {
2
+ anonymousId?: string | null;
3
+ userId?: string | null;
4
+ groupId?: string | null;
5
+ traits?: {
6
+ [k: string]: unknown;
7
+ };
8
+ timestamp?: string;
9
+ messageId?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/identify/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Identify',
5
+ description: 'Identify user in Ripe',
6
+ defaultSubscription: 'type = "identify"',
7
+ fields: {
8
+ anonymousId: {
9
+ type: 'string',
10
+ allowNull: true,
11
+ description: 'An anonymous identifier',
12
+ label: 'Anonymous ID',
13
+ default: { '@path': '$.anonymousId' }
14
+ },
15
+ userId: {
16
+ type: 'string',
17
+ allowNull: true,
18
+ description: 'The ID associated with the user',
19
+ label: 'User ID',
20
+ default: { '@path': '$.userId' }
21
+ },
22
+ groupId: {
23
+ type: 'string',
24
+ allowNull: true,
25
+ description: 'The group id',
26
+ label: 'Group ID',
27
+ default: { '@path': '$.context.groupId' }
28
+ },
29
+ traits: {
30
+ type: 'object',
31
+ label: 'Traits',
32
+ description: 'Traits to associate with the user',
33
+ required: false,
34
+ default: { '@path': '$.traits' }
35
+ },
36
+ timestamp: {
37
+ type: 'string',
38
+ format: 'date-time',
39
+ required: false,
40
+ description: 'The timestamp of the event',
41
+ label: 'Timestamp',
42
+ default: { '@path': '$.timestamp' }
43
+ },
44
+ messageId: {
45
+ type: 'string',
46
+ format: 'uuid',
47
+ required: false,
48
+ description: 'The Segment messageId',
49
+ label: 'MessageId',
50
+ default: { '@path': '$messageId' }
51
+ }
52
+ },
53
+ perform: (request, { payload, settings }) => {
54
+ return request(`${settings.endpoint}/identify`, {
55
+ method: 'post',
56
+ json: {
57
+ anonymousId: payload.anonymousId,
58
+ userId: payload.userId,
59
+ context: {
60
+ groupId: payload.groupId
61
+ },
62
+ traits: payload.traits,
63
+ messageId: payload.messageId,
64
+ timestamp: payload.timestamp ?? new Date()
65
+ }
66
+ });
67
+ }
68
+ };
69
+ exports.default = action;
70
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/identify/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,uBAAuB;IACpC,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,cAAc;YAC3B,KAAK,EAAE,UAAU;YACjB,OAAO,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;SAC1C;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,4BAA4B;YACzC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;SACpC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,uBAAuB;YACpC,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;SACnC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,OAAO,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,WAAW,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,OAAO,EAAE;oBACP,OAAO,EAAE,OAAO,CAAC,OAAO;iBACzB;gBACD,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { DestinationDefinition } from '@segment/actions-core';
2
+ import type { Settings } from './generated-types';
3
+ declare const destination: DestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const btoa_lite_1 = __importDefault(require("btoa-lite"));
7
+ const group_1 = __importDefault(require("./group"));
8
+ const identify_1 = __importDefault(require("./identify"));
9
+ const page_1 = __importDefault(require("./page"));
10
+ const track_1 = __importDefault(require("./track"));
11
+ const actions_core_1 = require("@segment/actions-core");
12
+ const destination = {
13
+ name: 'Ripe Cloud Mode (Actions)',
14
+ slug: 'actions-ripe-cloud',
15
+ mode: 'cloud',
16
+ description: 'Send server-side events to the Ripe REST API.',
17
+ authentication: {
18
+ scheme: 'custom',
19
+ fields: {
20
+ apiKey: {
21
+ label: 'API Key',
22
+ description: 'The Ripe API key found in the Ripe App',
23
+ type: 'string',
24
+ required: true
25
+ },
26
+ endpoint: {
27
+ label: 'API Endpoint',
28
+ description: `The Ripe API endpoint (do not change this unless you know what you're doing)`,
29
+ type: 'string',
30
+ format: 'uri',
31
+ default: 'https://api.getripe.com/core-backend'
32
+ }
33
+ },
34
+ testAuthentication: async (request, { settings }) => {
35
+ const res = await request(`${settings.endpoint}/auth/sdk`, {
36
+ method: 'get'
37
+ });
38
+ return res.status == 200;
39
+ }
40
+ },
41
+ extendRequest({ settings }) {
42
+ return {
43
+ headers: {
44
+ Authorization: `Basic ${btoa_lite_1.default(settings.apiKey)}`,
45
+ 'Content-Type': 'application/json'
46
+ }
47
+ };
48
+ },
49
+ actions: {
50
+ group: group_1.default,
51
+ identify: identify_1.default,
52
+ page: page_1.default,
53
+ track: track_1.default
54
+ },
55
+ presets: [
56
+ {
57
+ name: 'Group user',
58
+ subscribe: 'type = "group"',
59
+ partnerAction: 'group',
60
+ mapping: actions_core_1.defaultValues(identify_1.default.fields)
61
+ },
62
+ {
63
+ name: 'Identify user',
64
+ subscribe: 'type = "identify"',
65
+ partnerAction: 'identify',
66
+ mapping: actions_core_1.defaultValues(identify_1.default.fields)
67
+ },
68
+ {
69
+ name: 'Page view',
70
+ subscribe: 'type = "page"',
71
+ partnerAction: 'page',
72
+ mapping: actions_core_1.defaultValues(page_1.default.fields)
73
+ },
74
+ {
75
+ name: 'Track event',
76
+ subscribe: 'type = "track"',
77
+ partnerAction: 'track',
78
+ mapping: actions_core_1.defaultValues(track_1.default.fields)
79
+ }
80
+ ]
81
+ };
82
+ exports.default = destination;
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/ripe/index.ts"],"names":[],"mappings":";;;;;AAAA,0DAA4B;AAK5B,oDAA2B;AAC3B,0DAAiC;AACjC,kDAAyB;AACzB,oDAA2B;AAC3B,wDAAqD;AAErD,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,+CAA+C;IAE5D,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,wCAAwC;gBACrD,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,8EAA8E;gBAC3F,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,sCAAsC;aAChD;SACF;QAED,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;YAClD,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,GAAG,QAAQ,CAAC,QAAQ,WAAW,EAAE;gBACzD,MAAM,EAAE,KAAK;aACd,CAAC,CAAA;YACF,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,CAAA;QAC1B,CAAC;KACF;IAED,aAAa,CAAC,EAAE,QAAQ,EAAE;QACxB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,mBAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBAC/C,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,KAAK,EAAL,eAAK;QACL,QAAQ,EAAR,kBAAQ;QACR,IAAI,EAAJ,cAAI;QACJ,KAAK,EAAL,eAAK;KACN;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;SACxC;QACD;YACE,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,UAAU;YACzB,OAAO,EAAE,4BAAa,CAAC,kBAAQ,CAAC,MAAM,CAAC;SACxC;QACD;YACE,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,eAAe;YAC1B,aAAa,EAAE,MAAM;YACrB,OAAO,EAAE,4BAAa,CAAC,cAAI,CAAC,MAAM,CAAC;SACpC;QACD;YACE,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,gBAAgB;YAC3B,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,4BAAa,CAAC,eAAK,CAAC,MAAM,CAAC;SACrC;KACF;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,16 @@
1
+ export interface Payload {
2
+ anonymousId?: string | null;
3
+ userId?: string | null;
4
+ groupId?: string | null;
5
+ properties?: {
6
+ [k: string]: unknown;
7
+ };
8
+ name?: string;
9
+ url?: string | null;
10
+ path?: string | null;
11
+ search?: string | null;
12
+ referrer?: string | null;
13
+ title?: string | null;
14
+ timestamp?: string;
15
+ messageId?: string;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/page/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Page',
5
+ description: 'Register page view in Ripe',
6
+ defaultSubscription: 'type = "page"',
7
+ fields: {
8
+ anonymousId: {
9
+ type: 'string',
10
+ allowNull: true,
11
+ description: 'An anonymous identifier',
12
+ label: 'Anonymous ID',
13
+ default: { '@path': '$.anonymousId' }
14
+ },
15
+ userId: {
16
+ type: 'string',
17
+ allowNull: true,
18
+ description: 'The ID associated with the user',
19
+ label: 'User ID',
20
+ default: { '@path': '$.userId' }
21
+ },
22
+ groupId: {
23
+ type: 'string',
24
+ allowNull: true,
25
+ description: 'The group id',
26
+ label: 'Group ID',
27
+ default: { '@path': '$.context.groupId' }
28
+ },
29
+ properties: {
30
+ type: 'object',
31
+ required: false,
32
+ allowNull: false,
33
+ description: 'Page properties',
34
+ label: 'Properties',
35
+ default: { '@path': '$.properties' }
36
+ },
37
+ name: {
38
+ type: 'string',
39
+ required: false,
40
+ allowNull: false,
41
+ description: 'The name of the page',
42
+ label: 'Page Name',
43
+ default: { '@path': '$.properties.name' }
44
+ },
45
+ url: {
46
+ type: 'string',
47
+ format: 'uri',
48
+ allowNull: true,
49
+ description: 'The page URL',
50
+ label: 'Page URL',
51
+ default: {
52
+ '@if': {
53
+ exists: { '@path': '$.context.page.url' },
54
+ then: { '@path': '$.context.page.url' },
55
+ else: { '@path': '$.properties.url' }
56
+ }
57
+ }
58
+ },
59
+ path: {
60
+ type: 'string',
61
+ allowNull: true,
62
+ description: 'The page path',
63
+ label: 'Page Path',
64
+ default: {
65
+ '@if': {
66
+ exists: { '@path': '$.context.page.path' },
67
+ then: { '@path': '$.context.page.path' },
68
+ else: { '@path': '$.properties.path' }
69
+ }
70
+ }
71
+ },
72
+ search: {
73
+ type: 'string',
74
+ allowNull: true,
75
+ description: 'URL query string',
76
+ label: 'Page Query String',
77
+ default: {
78
+ '@if': {
79
+ exists: { '@path': '$.context.page.search' },
80
+ then: { '@path': '$.context.page.search' },
81
+ else: { '@path': '$.properties.search' }
82
+ }
83
+ }
84
+ },
85
+ referrer: {
86
+ type: 'string',
87
+ allowNull: true,
88
+ description: 'The page referrer',
89
+ label: 'Page Referrer',
90
+ default: {
91
+ '@if': {
92
+ exists: { '@path': '$.context.page.referrer' },
93
+ then: { '@path': '$.context.page.referrer' },
94
+ else: { '@path': '$.properties.referrer' }
95
+ }
96
+ }
97
+ },
98
+ title: {
99
+ type: 'string',
100
+ allowNull: true,
101
+ description: 'The page title',
102
+ label: 'Page Title',
103
+ default: {
104
+ '@if': {
105
+ exists: { '@path': '$.context.page.title' },
106
+ then: { '@path': '$.context.page.title' },
107
+ else: { '@path': '$.properties.title' }
108
+ }
109
+ }
110
+ },
111
+ timestamp: {
112
+ type: 'string',
113
+ format: 'date-time',
114
+ required: false,
115
+ description: 'The timestamp of the event',
116
+ label: 'Timestamp',
117
+ default: { '@path': '$.timestamp' }
118
+ },
119
+ messageId: {
120
+ type: 'string',
121
+ format: 'uuid',
122
+ required: false,
123
+ description: 'The Segment messageId',
124
+ label: 'MessageId',
125
+ default: { '@path': '$messageId' }
126
+ }
127
+ },
128
+ perform: (request, { payload, settings }) => {
129
+ return request(`${settings.endpoint}/page`, {
130
+ method: 'post',
131
+ json: {
132
+ anonymousId: payload.anonymousId,
133
+ userId: payload.userId,
134
+ context: {
135
+ groupId: payload.groupId,
136
+ page: {
137
+ url: payload.url,
138
+ path: payload.path,
139
+ search: payload.search,
140
+ referrer: payload.referrer,
141
+ title: payload.title
142
+ }
143
+ },
144
+ properties: payload.properties,
145
+ name: payload.name,
146
+ messageId: payload.messageId,
147
+ timestamp: payload.timestamp ?? new Date()
148
+ }
149
+ });
150
+ }
151
+ };
152
+ exports.default = action;
153
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/page/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IACl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AS,IAAI,IAAI,IAAI,EAAE;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,11 @@
1
+ export interface Payload {
2
+ anonymousId?: string | null;
3
+ userId?: string;
4
+ groupId?: string;
5
+ event: string;
6
+ properties?: {
7
+ [k: string]: unknown;
8
+ };
9
+ timestamp?: string;
10
+ messageId?: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/track/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Track',
5
+ description: 'Send user events to Ripe',
6
+ defaultSubscription: 'type = "track"',
7
+ fields: {
8
+ anonymousId: {
9
+ type: 'string',
10
+ allowNull: true,
11
+ description: 'An anonymous identifier',
12
+ label: 'Anonymous ID',
13
+ default: { '@path': '$.anonymousId' }
14
+ },
15
+ userId: {
16
+ type: 'string',
17
+ required: false,
18
+ description: 'The ID associated with the user',
19
+ label: 'User ID',
20
+ default: { '@path': '$.userId' }
21
+ },
22
+ groupId: {
23
+ type: 'string',
24
+ required: false,
25
+ description: 'The group id',
26
+ label: 'Group ID',
27
+ default: { '@path': '$.context.groupId' }
28
+ },
29
+ event: {
30
+ type: 'string',
31
+ required: true,
32
+ description: 'The event name',
33
+ label: 'Event Name',
34
+ default: { '@path': '$.event' }
35
+ },
36
+ properties: {
37
+ type: 'object',
38
+ required: false,
39
+ description: 'Properties to send with the event',
40
+ label: 'Event properties',
41
+ default: { '@path': '$.properties' }
42
+ },
43
+ timestamp: {
44
+ type: 'string',
45
+ format: 'date-time',
46
+ required: false,
47
+ description: 'The timestamp of the event',
48
+ label: 'Timestamp',
49
+ default: { '@path': '$.timestamp' }
50
+ },
51
+ messageId: {
52
+ type: 'string',
53
+ format: 'uuid',
54
+ required: false,
55
+ description: 'The Segment messageId',
56
+ label: 'MessageId',
57
+ default: { '@path': '$messageId' }
58
+ }
59
+ },
60
+ perform: (request, { payload, settings }) => {
61
+ return request(`${settings.endpoint}/track`, {
62
+ method: 'post',
63
+ json: {
64
+ name: payload.event,
65
+ anonymousId: payload.anonymousId,
66
+ userId: payload.userId,
67
+ context: {
68
+ groupId: payload.groupId
69
+ },
70
+ properties: payload.properties,
71
+ event: payload.event,
72
+ messageId: payload.messageId,
73
+ timestamp: payload.timestamp ?? new Date()
74
+ }
75
+ });
76
+ }
77
+ };
78
+ exports.default = action;
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/ripe/track/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,0BAA0B;IACvC,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;SACtC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf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9B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -131,8 +131,8 @@ const action = {
131
131
  perform: async (request, { settings, payload }) => {
132
132
  const sf = new sf_operations_1.default(settings.instanceUrl, request);
133
133
  if (payload.operation === 'create') {
134
- if (!payload.company || !payload.last_name) {
135
- throw new actions_core_1.IntegrationError('Missing company or last_name value', 'Misconfigured required field', 400);
134
+ if (!payload.last_name) {
135
+ throw new actions_core_1.IntegrationError('Missing last_name value', 'Misconfigured required field', 400);
136
136
  }
137
137
  return await sf.createRecord(payload, OBJECT_NAME);
138
138
  }
@@ -141,8 +141,8 @@ const action = {
141
141
  return await sf.updateRecord(payload, OBJECT_NAME);
142
142
  }
143
143
  if (payload.operation === 'upsert') {
144
- if (!payload.company || !payload.last_name) {
145
- throw new actions_core_1.IntegrationError('Missing company or last_name value', 'Misconfigured required field', 400);
144
+ if (!payload.last_name) {
145
+ throw new actions_core_1.IntegrationError('Missing last_name value', 'Misconfigured required field', 400);
146
146
  }
147
147
  return await sf.upsertRecord(payload, OBJECT_NAME);
148
148
  }
@@ -150,8 +150,8 @@ const action = {
150
150
  performBatch: async (request, { settings, payload }) => {
151
151
  const sf = new sf_operations_1.default(settings.instanceUrl, request);
152
152
  if (payload[0].operation === 'upsert') {
153
- if (!payload[0].company || !payload[0].last_name) {
154
- throw new actions_core_1.IntegrationError('Missing company or last_name value', 'Misconfigured required field', 400);
153
+ if (!payload[0].last_name) {
154
+ throw new actions_core_1.IntegrationError('Missing last_name value', 'Misconfigured required field', 400);
155
155
  }
156
156
  }
157
157
  return sf.bulkHandler(payload, OBJECT_NAME);