@segment/action-destinations 3.331.2-tiktok.1 → 3.331.4-staging

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 (153) hide show
  1. package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +1 -1
  2. package/dist/destinations/criteo-audiences/addUserToAudience/index.js +8 -8
  3. package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
  4. package/dist/destinations/criteo-audiences/criteo-audiences.d.ts +5 -6
  5. package/dist/destinations/criteo-audiences/criteo-audiences.js +66 -53
  6. package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
  7. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +8 -8
  8. package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
  9. package/dist/destinations/devrev/createRevUser/index.js +1 -1
  10. package/dist/destinations/devrev/createRevUser/index.js.map +1 -1
  11. package/dist/destinations/devrev/mocks/index.d.ts +1 -1
  12. package/dist/destinations/devrev/mocks/index.js +1 -1
  13. package/dist/destinations/devrev/mocks/index.js.map +1 -1
  14. package/dist/destinations/display-video-360/addToAudience/generated-types.d.ts +5 -0
  15. package/dist/destinations/display-video-360/addToAudience/index.d.ts +2 -2
  16. package/dist/destinations/display-video-360/addToAudience/index.js +20 -4
  17. package/dist/destinations/display-video-360/addToAudience/index.js.map +1 -1
  18. package/dist/destinations/display-video-360/constants.d.ts +2 -0
  19. package/dist/destinations/display-video-360/constants.js +4 -2
  20. package/dist/destinations/display-video-360/constants.js.map +1 -1
  21. package/dist/destinations/display-video-360/errors.d.ts +2 -0
  22. package/dist/destinations/display-video-360/errors.js +40 -0
  23. package/dist/destinations/display-video-360/errors.js.map +1 -0
  24. package/dist/destinations/display-video-360/generated-types.d.ts +2 -1
  25. package/dist/destinations/display-video-360/index.js +57 -51
  26. package/dist/destinations/display-video-360/index.js.map +1 -1
  27. package/dist/destinations/display-video-360/listManagement.d.ts +9 -0
  28. package/dist/destinations/display-video-360/listManagement.js +16 -0
  29. package/dist/destinations/display-video-360/listManagement.js.map +1 -0
  30. package/dist/destinations/display-video-360/properties.d.ts +6 -0
  31. package/dist/destinations/display-video-360/properties.js +49 -0
  32. package/dist/destinations/display-video-360/properties.js.map +1 -0
  33. package/dist/destinations/display-video-360/proto/protofile.d.ts +104 -0
  34. package/dist/destinations/display-video-360/proto/protofile.js +251 -0
  35. package/dist/destinations/display-video-360/proto/protofile.js.map +1 -0
  36. package/dist/destinations/display-video-360/removeFromAudience/generated-types.d.ts +5 -0
  37. package/dist/destinations/display-video-360/removeFromAudience/index.d.ts +2 -2
  38. package/dist/destinations/display-video-360/removeFromAudience/index.js +19 -3
  39. package/dist/destinations/display-video-360/removeFromAudience/index.js.map +1 -1
  40. package/dist/destinations/display-video-360/shared.d.ts +16 -0
  41. package/dist/destinations/display-video-360/shared.js +138 -0
  42. package/dist/destinations/display-video-360/shared.js.map +1 -0
  43. package/dist/destinations/display-video-360/types.d.ts +27 -0
  44. package/dist/destinations/{yahoo-audiences/createCustomerNode/generated-types.js → display-video-360/types.js} +1 -1
  45. package/dist/destinations/display-video-360/types.js.map +1 -0
  46. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +9 -0
  47. package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -1
  48. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +1 -1
  49. package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -1
  50. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +9 -0
  51. package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -1
  52. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +9 -0
  53. package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -1
  54. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +9 -0
  55. package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -1
  56. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +3 -1
  57. package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -1
  58. package/dist/destinations/engage/utils/EngageStats.js +5 -1
  59. package/dist/destinations/engage/utils/EngageStats.js.map +1 -1
  60. package/dist/destinations/engage/utils/track.d.ts +10 -10
  61. package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +1 -0
  62. package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +1 -0
  63. package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +1 -0
  64. package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +1 -0
  65. package/dist/destinations/hyperengage/group/generated-types.d.ts +1 -0
  66. package/dist/destinations/hyperengage/group/index.js +20 -2
  67. package/dist/destinations/hyperengage/group/index.js.map +1 -1
  68. package/dist/destinations/hyperengage/identify/index.js +7 -1
  69. package/dist/destinations/hyperengage/identify/index.js.map +1 -1
  70. package/dist/destinations/hyperengage/track/generated-types.d.ts +1 -1
  71. package/dist/destinations/hyperengage/track/index.js +9 -9
  72. package/dist/destinations/hyperengage/track/index.js.map +1 -1
  73. package/dist/destinations/hyperengage/validateInput.js +5 -2
  74. package/dist/destinations/hyperengage/validateInput.js.map +1 -1
  75. package/dist/destinations/klaviyo/addProfileToList/generated-types.d.ts +1 -1
  76. package/dist/destinations/klaviyo/addProfileToList/index.js +9 -33
  77. package/dist/destinations/klaviyo/addProfileToList/index.js.map +1 -1
  78. package/dist/destinations/klaviyo/functions.d.ts +11 -3
  79. package/dist/destinations/klaviyo/functions.js +66 -14
  80. package/dist/destinations/klaviyo/functions.js.map +1 -1
  81. package/dist/destinations/klaviyo/index.d.ts +2 -2
  82. package/dist/destinations/klaviyo/index.js +53 -7
  83. package/dist/destinations/klaviyo/index.js.map +1 -1
  84. package/dist/destinations/klaviyo/properties.js +5 -3
  85. package/dist/destinations/klaviyo/properties.js.map +1 -1
  86. package/dist/destinations/klaviyo/{removeProfileToList → removeProfileFromList}/generated-types.d.ts +1 -1
  87. package/dist/destinations/klaviyo/removeProfileFromList/generated-types.js.map +1 -0
  88. package/dist/destinations/klaviyo/removeProfileFromList/index.js +27 -0
  89. package/dist/destinations/klaviyo/removeProfileFromList/index.js.map +1 -0
  90. package/dist/destinations/klaviyo/types.d.ts +51 -0
  91. package/dist/destinations/klaviyo/types.js.map +1 -1
  92. package/dist/destinations/klaviyo/upsertProfile/index.js +2 -2
  93. package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
  94. package/dist/destinations/linkedin-conversions/api/api.test.js +2 -2
  95. package/dist/destinations/linkedin-conversions/api/api.test.js.map +1 -1
  96. package/dist/destinations/linkedin-conversions/api/index.d.ts +10 -2
  97. package/dist/destinations/linkedin-conversions/api/index.js +198 -1
  98. package/dist/destinations/linkedin-conversions/api/index.js.map +1 -1
  99. package/dist/destinations/linkedin-conversions/constants.d.ts +1 -0
  100. package/dist/destinations/linkedin-conversions/constants.js +7 -1
  101. package/dist/destinations/linkedin-conversions/constants.js.map +1 -1
  102. package/dist/destinations/linkedin-conversions/index.js +2 -1
  103. package/dist/destinations/linkedin-conversions/index.js.map +1 -1
  104. package/dist/destinations/linkedin-conversions/streamConversion/generated-types.d.ts +18 -0
  105. package/dist/destinations/linkedin-conversions/streamConversion/index.js +181 -51
  106. package/dist/destinations/linkedin-conversions/streamConversion/index.js.map +1 -1
  107. package/dist/destinations/linkedin-conversions/types.d.ts +64 -0
  108. package/dist/destinations/liveramp-audiences/operations.js +13 -19
  109. package/dist/destinations/liveramp-audiences/operations.js.map +1 -1
  110. package/dist/destinations/moengage/index.js +4 -0
  111. package/dist/destinations/moengage/index.js.map +1 -1
  112. package/dist/destinations/snap-conversions-api/snap-capi-properties.js +8 -2
  113. package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -1
  114. package/dist/destinations/tiktok-audiences/properties.js +4 -5
  115. package/dist/destinations/tiktok-audiences/properties.js.map +1 -1
  116. package/dist/destinations/webhook-audiences/index.js +3 -1
  117. package/dist/destinations/webhook-audiences/index.js.map +1 -1
  118. package/dist/destinations/yahoo-audiences/generated-types.d.ts +1 -2
  119. package/dist/destinations/yahoo-audiences/index.js +11 -21
  120. package/dist/destinations/yahoo-audiences/index.js.map +1 -1
  121. package/dist/destinations/yahoo-audiences/updateSegment/generated-types.d.ts +1 -1
  122. package/dist/destinations/yahoo-audiences/updateSegment/index.js +23 -23
  123. package/dist/destinations/yahoo-audiences/updateSegment/index.js.map +1 -1
  124. package/dist/destinations/yahoo-audiences/utils-rt.js +15 -5
  125. package/dist/destinations/yahoo-audiences/utils-rt.js.map +1 -1
  126. package/dist/destinations/yahoo-audiences/utils-tax.js +2 -2
  127. package/dist/destinations/yahoo-audiences/utils-tax.js.map +1 -1
  128. package/package.json +5 -2
  129. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +0 -1
  130. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +0 -184
  131. package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +0 -1
  132. package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +0 -1
  133. package/dist/destinations/klaviyo/removeProfileToList/index.js +0 -43
  134. package/dist/destinations/klaviyo/removeProfileToList/index.js.map +0 -1
  135. package/dist/destinations/mixpanel/utils.d.ts +0 -13
  136. package/dist/destinations/mixpanel/utils.js +0 -117
  137. package/dist/destinations/mixpanel/utils.js.map +0 -1
  138. package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.d.ts +0 -4
  139. package/dist/destinations/yahoo-audiences/createCustomerNode/generated-types.js.map +0 -1
  140. package/dist/destinations/yahoo-audiences/createCustomerNode/index.d.ts +0 -5
  141. package/dist/destinations/yahoo-audiences/createCustomerNode/index.js +0 -33
  142. package/dist/destinations/yahoo-audiences/createCustomerNode/index.js.map +0 -1
  143. package/dist/destinations/yahoo-audiences/createSegment/generated-types.d.ts +0 -6
  144. package/dist/destinations/yahoo-audiences/createSegment/generated-types.js +0 -3
  145. package/dist/destinations/yahoo-audiences/createSegment/generated-types.js.map +0 -1
  146. package/dist/destinations/yahoo-audiences/createSegment/index.d.ts +0 -5
  147. package/dist/destinations/yahoo-audiences/createSegment/index.js +0 -45
  148. package/dist/destinations/yahoo-audiences/createSegment/index.js.map +0 -1
  149. package/dist/destinations/yahoo-audiences/utils.d.ts +0 -4
  150. package/dist/destinations/yahoo-audiences/utils.js +0 -30
  151. package/dist/destinations/yahoo-audiences/utils.js.map +0 -1
  152. /package/dist/destinations/klaviyo/{removeProfileToList → removeProfileFromList}/generated-types.js +0 -0
  153. /package/dist/destinations/klaviyo/{removeProfileToList → removeProfileFromList}/index.d.ts +0 -0
@@ -7,6 +7,8 @@ const actions_core_1 = require("@segment/actions-core");
7
7
  const addToAudience_1 = __importDefault(require("./addToAudience"));
8
8
  const removeFromAudience_1 = __importDefault(require("./removeFromAudience"));
9
9
  const constants_1 = require("./constants");
10
+ const shared_1 = require("./shared");
11
+ const errors_1 = require("./errors");
10
12
  const destination = {
11
13
  name: 'Display and Video 360 (Actions)',
12
14
  slug: 'actions-display-video-360',
@@ -15,7 +17,7 @@ const destination = {
15
17
  scheme: 'oauth2',
16
18
  fields: {},
17
19
  refreshAccessToken: async (request, { auth }) => {
18
- const { data } = await request('https://accounts.google.com/o/oauth2/token', {
20
+ const { data } = await request(constants_1.OAUTH_URL, {
19
21
  method: 'POST',
20
22
  body: new URLSearchParams({
21
23
  refresh_token: auth.refreshToken,
@@ -27,18 +29,23 @@ const destination = {
27
29
  return { accessToken: data.access_token };
28
30
  }
29
31
  },
30
- extendRequest({ auth }) {
31
- return {
32
- headers: {
33
- authorization: `Bearer ${auth?.accessToken}`
34
- }
35
- };
36
- },
37
32
  audienceFields: {
38
33
  advertiserId: {
39
34
  type: 'string',
40
35
  label: 'Advertiser ID',
36
+ required: true,
41
37
  description: 'The ID of your advertiser, used throughout Display & Video 360. Use this ID when you contact Display & Video 360 support to help our teams locate your specific account.'
38
+ },
39
+ accountType: {
40
+ type: 'string',
41
+ label: 'Account Type',
42
+ description: 'The type of the advertiser account you have linked to this Display & Video 360 destination.',
43
+ required: true,
44
+ choices: [
45
+ { label: 'Advertiser', value: 'DISPLAY_VIDEO_ADVERTISER' },
46
+ { label: 'Partner', value: 'DISPLAY_VIDEO_PARTNER' },
47
+ { label: 'Publisher', value: 'GOOGLE_AD_MANAGER' }
48
+ ]
42
49
  }
43
50
  },
44
51
  audienceConfig: {
@@ -47,83 +54,82 @@ const destination = {
47
54
  full_audience_sync: true
48
55
  },
49
56
  async createAudience(request, createAudienceInput) {
50
- const audienceName = createAudienceInput.audienceName;
51
- const advertiserId = createAudienceInput.audienceSettings?.advertiserId;
52
- const statsClient = createAudienceInput?.statsContext?.statsClient;
53
- const statsTags = createAudienceInput?.statsContext?.tags;
57
+ const { audienceName, audienceSettings, statsContext, settings } = createAudienceInput;
58
+ const { advertiserId, accountType } = audienceSettings || {};
59
+ const { statsClient, tags: statsTags } = statsContext || {};
54
60
  if (!audienceName) {
55
61
  throw new actions_core_1.IntegrationError('Missing audience name value', 'MISSING_REQUIRED_FIELD', 400);
56
62
  }
57
63
  if (!advertiserId) {
58
64
  throw new actions_core_1.IntegrationError('Missing advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
59
65
  }
60
- const partnerCreateAudienceUrl = constants_1.CREATE_AUDIENCE_URL.replace('advertiserID', advertiserId);
66
+ if (!accountType) {
67
+ throw new actions_core_1.IntegrationError('Missing account type value', 'MISSING_REQUIRED_FIELD', 400);
68
+ }
69
+ const listTypeMap = { basicUserList: {}, type: 'REMARKETING', membershipStatus: 'OPEN' };
70
+ const partnerCreateAudienceUrl = constants_1.CREATE_AUDIENCE_URL.replace('advertiserID', advertiserId).replace('accountType', accountType);
61
71
  let response;
62
72
  try {
63
73
  response = await request(partnerCreateAudienceUrl, {
74
+ headers: shared_1.buildHeaders(createAudienceInput.audienceSettings, settings),
64
75
  method: 'POST',
65
- headers: {
66
- 'Content-Type': 'application/json',
67
- 'Login-Customer-Id': `products/DISPLAY_VIDEO_ADVERTISER/customers/${advertiserId}`
68
- },
69
76
  json: {
70
77
  operations: [
71
78
  {
72
79
  create: {
73
- basicUserList: {},
80
+ ...listTypeMap,
74
81
  name: audienceName,
75
82
  description: 'Created by Segment',
76
- membershipStatus: 'OPEN',
77
- type: 'REMARKETING',
78
83
  membershipLifeSpan: '540'
79
84
  }
80
85
  }
81
86
  ]
82
87
  }
83
88
  });
89
+ const r = await response?.json();
90
+ statsClient?.incr('createAudience.success', 1, statsTags);
91
+ return {
92
+ externalId: r['results'][0]['resourceName']
93
+ };
84
94
  }
85
95
  catch (error) {
86
- const errorMessage = await JSON.parse(error.response.content).error.details[0].errors[0].message;
87
96
  statsClient?.incr('createAudience.error', 1, statsTags);
88
- throw new actions_core_1.IntegrationError(errorMessage, 'INVALID_RESPONSE', 400);
97
+ throw errors_1.handleRequestError(error);
89
98
  }
90
- const r = await response.json();
91
- statsClient?.incr('createAudience.success', 1, statsTags);
92
- return {
93
- externalId: r['results'][0]['resourceName']
94
- };
95
99
  },
96
100
  async getAudience(request, getAudienceInput) {
97
- const statsClient = getAudienceInput?.statsContext?.statsClient;
98
- const statsTags = getAudienceInput?.statsContext?.tags;
99
- const advertiserId = getAudienceInput.audienceSettings?.advertiserId;
101
+ const { statsContext, audienceSettings, settings } = getAudienceInput;
102
+ const { statsClient, tags: statsTags } = statsContext || {};
103
+ const { advertiserId, accountType } = audienceSettings || {};
100
104
  if (!advertiserId) {
101
105
  throw new actions_core_1.IntegrationError('Missing required advertiser ID value', 'MISSING_REQUIRED_FIELD', 400);
102
106
  }
103
- const advertiserGetAudienceUrl = constants_1.GET_AUDIENCE_URL.replace('advertiserID', advertiserId);
104
- const response = await request(advertiserGetAudienceUrl, {
105
- headers: {
106
- 'Content-Type': 'application/json',
107
- 'Login-Customer-Id': `products/DISPLAY_VIDEO_ADVERTISER/customers/${advertiserId}`
108
- },
109
- method: 'POST',
110
- json: {
111
- query: `SELECT user_list.name, user_list.description, user_list.membership_status, user_list.match_rate_percentage FROM user_list WHERE user_list.resource_name = "${getAudienceInput.externalId}"`
107
+ if (!accountType) {
108
+ throw new actions_core_1.IntegrationError('Missing account type value', 'MISSING_REQUIRED_FIELD', 400);
109
+ }
110
+ const advertiserGetAudienceUrl = constants_1.GET_AUDIENCE_URL.replace('advertiserID', advertiserId).replace('accountType', accountType);
111
+ try {
112
+ const response = await request(advertiserGetAudienceUrl, {
113
+ headers: shared_1.buildHeaders(audienceSettings, settings),
114
+ method: 'POST',
115
+ json: {
116
+ query: `SELECT user_list.name, user_list.description, user_list.membership_status, user_list.match_rate_percentage FROM user_list WHERE user_list.resource_name = "${getAudienceInput.externalId}"`
117
+ }
118
+ });
119
+ const r = await response.json();
120
+ const externalId = r[0]?.results[0]?.userList?.resourceName;
121
+ if (externalId !== getAudienceInput.externalId) {
122
+ throw new actions_core_1.IntegrationError("Unable to verify ownership over audience. Segment Audience ID doesn't match Googles Audience ID.", 'INVALID_REQUEST_DATA', 400);
112
123
  }
113
- });
114
- const r = await response.json();
115
- if (response.status !== 200) {
116
- statsClient?.incr('getAudience.error', 1, statsTags);
117
- throw new actions_core_1.IntegrationError('Invalid response from get audience request', 'INVALID_RESPONSE', 400);
124
+ statsClient?.incr('getAudience.success', 1, statsTags);
125
+ return {
126
+ externalId: externalId
127
+ };
118
128
  }
119
- const externalId = r[0]?.results[0]?.userList?.resourceName;
120
- if (externalId !== getAudienceInput.externalId) {
121
- throw new actions_core_1.IntegrationError("Unable to verify ownership over audience. Segment Audience ID doesn't match Googles Audience ID.", 'INVALID_REQUEST_DATA', 400);
129
+ catch (error) {
130
+ statsClient?.incr('getAudience.error', 1, statsTags);
131
+ throw errors_1.handleRequestError(error);
122
132
  }
123
- statsClient?.incr('getAudience.success', 1, statsTags);
124
- return {
125
- externalId: externalId
126
- };
127
133
  }
128
134
  },
129
135
  actions: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/index.ts"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A4C,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAA;aAClG;YAED,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAA;YAE3D,IAAI,UAAU,KAAK,gBAAgB,CAAC,UAAU,EAAE;gBAC9C,MAAM,IAAI,+BAAgB,CACxB,kGAAkG,EAClG,sBAAsB,EACtB,GAAG,CACJ,CAAA;aACF;YAED,WAAW,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;YACtD,OAAO;gBACL,UAAU,EAAE,UAAU;aACvB,CAAA;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;QACb,kBAAkB,EAAlB,4BAAkB;KACnB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAuF;AAKvF,oEAA2C;AAC3C,8EAAqD;AAErD,2CAA8E;AAC9E,qCAAuC;AACvC,qCAA6C;AAE7C,MAAM,WAAW,GAA8D;IAC7E,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,EAAE;QACV,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC9C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAuB,qBAAS,EAAE;gBAC9D,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;i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A;aACF;YAAC,OAAO,KAAK,EAAE;gBACd,WAAW,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;gBACpD,MAAM,2BAAkB,CAAC,KAAK,CAAC,CAAA;aAChC;QACH,CAAC;KACF;IACD,OAAO,EAAE;QACP,aAAa,EAAb,uBAAa;QACb,kBAAkB,EAAlB,4BAAkB;KACnB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,9 @@
1
+ declare type BasicListTypeMap = {
2
+ basicUserList: any;
3
+ [key: string]: any;
4
+ } | {
5
+ crmBasedUserList: any;
6
+ [key: string]: any;
7
+ };
8
+ export declare const buildListTypeMap: (listType: string) => BasicListTypeMap;
9
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildListTypeMap = void 0;
4
+ const cjs_1 = require("@segment/actions-core/dist/cjs");
5
+ const buildListTypeMap = (listType) => {
6
+ switch (listType) {
7
+ case 'basicUserList':
8
+ return { basicUserList: {}, type: 'REMARKETING', membershipStatus: 'OPEN' };
9
+ case 'customerMatchList':
10
+ return { crmBasedUserList: { uploadKeyType: 'CONTACT_INFO' } };
11
+ default:
12
+ throw new cjs_1.IntegrationError('Invalid list type', 'INVALID_REQUEST_DATA', 400);
13
+ }
14
+ };
15
+ exports.buildListTypeMap = buildListTypeMap;
16
+ //# sourceMappingURL=listManagement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listManagement.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/listManagement.ts"],"names":[],"mappings":";;;AAAA,wDAAiE;AAI1D,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAoB,EAAE;IACrE,QAAQ,QAAQ,EAAE;QAChB,KAAK,eAAe;YAClB,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAA;QAC7E,KAAK,mBAAmB;YACtB,OAAO,EAAE,gBAAgB,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,CAAA;QAChE;YACE,MAAM,IAAI,sBAAgB,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,GAAG,CAAC,CAAA;KAC/E;AACH,CAAC,CAAA;AATY,QAAA,gBAAgB,oBAS5B"}
@@ -0,0 +1,6 @@
1
+ import { InputField } from '@segment/actions-core/destination-kit/types';
2
+ export declare const mobile_advertising_id: InputField;
3
+ export declare const google_gid: InputField;
4
+ export declare const partner_provided_id: InputField;
5
+ export declare const enable_batching: InputField;
6
+ export declare const external_audience_id: InputField;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.external_audience_id = exports.enable_batching = exports.partner_provided_id = exports.google_gid = exports.mobile_advertising_id = void 0;
4
+ exports.mobile_advertising_id = {
5
+ label: 'Mobile Advertising ID',
6
+ description: 'Mobile Advertising ID. This could be a GAID, or IDFA. Remove if not needed.',
7
+ type: 'string',
8
+ required: false,
9
+ default: {
10
+ '@path': '$.context.device.advertisingId'
11
+ }
12
+ };
13
+ exports.google_gid = {
14
+ label: 'Google GID',
15
+ description: 'Google GID. Remove if not needed.',
16
+ type: 'string',
17
+ required: false,
18
+ default: {
19
+ '@path': '$.context.traits.google_gid'
20
+ }
21
+ };
22
+ exports.partner_provided_id = {
23
+ label: 'Partner Provided ID',
24
+ description: 'Partner Provided ID. Remove if not needed.',
25
+ type: 'string',
26
+ required: false,
27
+ default: {
28
+ '@path': '$.anonymousId'
29
+ }
30
+ };
31
+ exports.enable_batching = {
32
+ label: 'Enable Batching',
33
+ description: 'Enable batching of requests to the TikTok Audiences.',
34
+ type: 'boolean',
35
+ default: true,
36
+ required: true,
37
+ unsafe_hidden: true
38
+ };
39
+ exports.external_audience_id = {
40
+ label: 'External Audience ID',
41
+ description: "The Audience ID in Google's DB.",
42
+ type: 'string',
43
+ required: true,
44
+ unsafe_hidden: true,
45
+ default: {
46
+ '@path': '$.context.personas.external_audience_id'
47
+ }
48
+ };
49
+ //# sourceMappingURL=properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/destinations/display-video-360/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAe;IAC/C,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,6EAA6E;IAC1F,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE;QACP,OAAO,EAAE,gCAAgC;KAC1C;CACF,CAAA;AAEY,QAAA,UAAU,GAAe;IACpC,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE;QACP,OAAO,EAAE,6BAA6B;KACvC;CACF,CAAA;AAEY,QAAA,mBAAmB,GAAe;IAC7C,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,4CAA4C;IACzD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE;QACP,OAAO,EAAE,eAAe;KACzB;CACF,CAAA;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,sDAAsD;IACnE,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;CACpB,CAAA;AAEY,QAAA,oBAAoB,GAAe;IAC9C,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EAAE,iCAAiC;IAC9C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;IACnB,OAAO,EAAE;QACP,OAAO,EAAE,yCAAyC;KACnD;CACF,CAAA"}
@@ -0,0 +1,104 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from '@bufbuild/protobuf';
2
+ import { Message, proto2 } from '@bufbuild/protobuf';
3
+ export declare enum UserIdType {
4
+ GOOGLE_USER_ID = 0,
5
+ IDFA = 1,
6
+ ANDROID_ADVERTISING_ID = 2,
7
+ RIDA = 5,
8
+ AFAI = 6,
9
+ MSAI = 7,
10
+ GENERIC_DEVICE_ID = 9,
11
+ PARTNER_PROVIDED_ID = 4
12
+ }
13
+ export declare enum NotificationCode {
14
+ INACTIVE_COOKIE = 0
15
+ }
16
+ export declare enum NotificationStatus {
17
+ NO_NOTIFICATION = 0,
18
+ NOTIFICATIONS_OMITTED = 1
19
+ }
20
+ export declare enum ErrorCode {
21
+ NO_ERROR = 0,
22
+ PARTIAL_SUCCESS = 1,
23
+ PERMISSION_DENIED = 2,
24
+ BAD_DATA = 3,
25
+ BAD_COOKIE = 4,
26
+ BAD_ATTRIBUTE_ID = 5,
27
+ BAD_NETWORK_ID = 7,
28
+ REQUEST_TOO_BIG = 8,
29
+ EMPTY_REQUEST = 9,
30
+ INTERNAL_ERROR = 10,
31
+ BAD_DATA_SOURCE_ID = 11,
32
+ BAD_TIMESTAMP = 12,
33
+ UNKNOWN_ID = 21
34
+ }
35
+ export declare class UserDataOperation extends Message<UserDataOperation> {
36
+ userId?: string;
37
+ userIdType?: UserIdType;
38
+ userListId?: bigint;
39
+ timeAddedToUserList?: bigint;
40
+ timeAddedToUserListInUsec?: bigint;
41
+ delete?: boolean;
42
+ optOut?: boolean;
43
+ dataSourceId?: number;
44
+ constructor(data?: PartialMessage<UserDataOperation>);
45
+ static readonly runtime: typeof proto2;
46
+ static readonly typeName = "UserDataOperation";
47
+ static readonly fields: FieldList;
48
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UserDataOperation;
49
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UserDataOperation;
50
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UserDataOperation;
51
+ static equals(a: UserDataOperation | PlainMessage<UserDataOperation> | undefined, b: UserDataOperation | PlainMessage<UserDataOperation> | undefined): boolean;
52
+ }
53
+ export declare class UpdateUsersDataRequest extends Message<UpdateUsersDataRequest> {
54
+ ops: UserDataOperation[];
55
+ sendNotifications?: boolean;
56
+ constructor(data?: PartialMessage<UpdateUsersDataRequest>);
57
+ static readonly runtime: typeof proto2;
58
+ static readonly typeName = "UpdateUsersDataRequest";
59
+ static readonly fields: FieldList;
60
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUsersDataRequest;
61
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUsersDataRequest;
62
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUsersDataRequest;
63
+ static equals(a: UpdateUsersDataRequest | PlainMessage<UpdateUsersDataRequest> | undefined, b: UpdateUsersDataRequest | PlainMessage<UpdateUsersDataRequest> | undefined): boolean;
64
+ }
65
+ export declare class ErrorInfo extends Message<ErrorInfo> {
66
+ userListId?: bigint;
67
+ userId?: string;
68
+ userIdType?: UserIdType;
69
+ errorCode?: ErrorCode;
70
+ constructor(data?: PartialMessage<ErrorInfo>);
71
+ static readonly runtime: typeof proto2;
72
+ static readonly typeName = "ErrorInfo";
73
+ static readonly fields: FieldList;
74
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ErrorInfo;
75
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ErrorInfo;
76
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ErrorInfo;
77
+ static equals(a: ErrorInfo | PlainMessage<ErrorInfo> | undefined, b: ErrorInfo | PlainMessage<ErrorInfo> | undefined): boolean;
78
+ }
79
+ export declare class NotificationInfo extends Message<NotificationInfo> {
80
+ userId?: string;
81
+ notificationCode?: NotificationCode;
82
+ constructor(data?: PartialMessage<NotificationInfo>);
83
+ static readonly runtime: typeof proto2;
84
+ static readonly typeName = "NotificationInfo";
85
+ static readonly fields: FieldList;
86
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NotificationInfo;
87
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NotificationInfo;
88
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NotificationInfo;
89
+ static equals(a: NotificationInfo | PlainMessage<NotificationInfo> | undefined, b: NotificationInfo | PlainMessage<NotificationInfo> | undefined): boolean;
90
+ }
91
+ export declare class UpdateUsersDataResponse extends Message<UpdateUsersDataResponse> {
92
+ status?: ErrorCode;
93
+ errors: ErrorInfo[];
94
+ notifications: NotificationInfo[];
95
+ notificationStatus?: NotificationStatus;
96
+ constructor(data?: PartialMessage<UpdateUsersDataResponse>);
97
+ static readonly runtime: typeof proto2;
98
+ static readonly typeName = "UpdateUsersDataResponse";
99
+ static readonly fields: FieldList;
100
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUsersDataResponse;
101
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUsersDataResponse;
102
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUsersDataResponse;
103
+ static equals(a: UpdateUsersDataResponse | PlainMessage<UpdateUsersDataResponse> | undefined, b: UpdateUsersDataResponse | PlainMessage<UpdateUsersDataResponse> | undefined): boolean;
104
+ }
@@ -0,0 +1,251 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateUsersDataResponse = exports.NotificationInfo = exports.ErrorInfo = exports.UpdateUsersDataRequest = exports.UserDataOperation = exports.ErrorCode = exports.NotificationStatus = exports.NotificationCode = exports.UserIdType = void 0;
4
+ const protobuf_1 = require("@bufbuild/protobuf");
5
+ var UserIdType;
6
+ (function (UserIdType) {
7
+ UserIdType[UserIdType["GOOGLE_USER_ID"] = 0] = "GOOGLE_USER_ID";
8
+ UserIdType[UserIdType["IDFA"] = 1] = "IDFA";
9
+ UserIdType[UserIdType["ANDROID_ADVERTISING_ID"] = 2] = "ANDROID_ADVERTISING_ID";
10
+ UserIdType[UserIdType["RIDA"] = 5] = "RIDA";
11
+ UserIdType[UserIdType["AFAI"] = 6] = "AFAI";
12
+ UserIdType[UserIdType["MSAI"] = 7] = "MSAI";
13
+ UserIdType[UserIdType["GENERIC_DEVICE_ID"] = 9] = "GENERIC_DEVICE_ID";
14
+ UserIdType[UserIdType["PARTNER_PROVIDED_ID"] = 4] = "PARTNER_PROVIDED_ID";
15
+ })(UserIdType = exports.UserIdType || (exports.UserIdType = {}));
16
+ protobuf_1.proto2.util.setEnumType(UserIdType, 'UserIdType', [
17
+ { no: 0, name: 'GOOGLE_USER_ID' },
18
+ { no: 1, name: 'IDFA' },
19
+ { no: 2, name: 'ANDROID_ADVERTISING_ID' },
20
+ { no: 5, name: 'RIDA' },
21
+ { no: 6, name: 'AFAI' },
22
+ { no: 7, name: 'MSAI' },
23
+ { no: 9, name: 'GENERIC_DEVICE_ID' },
24
+ { no: 4, name: 'PARTNER_PROVIDED_ID' }
25
+ ]);
26
+ var NotificationCode;
27
+ (function (NotificationCode) {
28
+ NotificationCode[NotificationCode["INACTIVE_COOKIE"] = 0] = "INACTIVE_COOKIE";
29
+ })(NotificationCode = exports.NotificationCode || (exports.NotificationCode = {}));
30
+ protobuf_1.proto2.util.setEnumType(NotificationCode, 'NotificationCode', [{ no: 0, name: 'INACTIVE_COOKIE' }]);
31
+ var NotificationStatus;
32
+ (function (NotificationStatus) {
33
+ NotificationStatus[NotificationStatus["NO_NOTIFICATION"] = 0] = "NO_NOTIFICATION";
34
+ NotificationStatus[NotificationStatus["NOTIFICATIONS_OMITTED"] = 1] = "NOTIFICATIONS_OMITTED";
35
+ })(NotificationStatus = exports.NotificationStatus || (exports.NotificationStatus = {}));
36
+ protobuf_1.proto2.util.setEnumType(NotificationStatus, 'NotificationStatus', [
37
+ { no: 0, name: 'NO_NOTIFICATION' },
38
+ { no: 1, name: 'NOTIFICATIONS_OMITTED' }
39
+ ]);
40
+ var ErrorCode;
41
+ (function (ErrorCode) {
42
+ ErrorCode[ErrorCode["NO_ERROR"] = 0] = "NO_ERROR";
43
+ ErrorCode[ErrorCode["PARTIAL_SUCCESS"] = 1] = "PARTIAL_SUCCESS";
44
+ ErrorCode[ErrorCode["PERMISSION_DENIED"] = 2] = "PERMISSION_DENIED";
45
+ ErrorCode[ErrorCode["BAD_DATA"] = 3] = "BAD_DATA";
46
+ ErrorCode[ErrorCode["BAD_COOKIE"] = 4] = "BAD_COOKIE";
47
+ ErrorCode[ErrorCode["BAD_ATTRIBUTE_ID"] = 5] = "BAD_ATTRIBUTE_ID";
48
+ ErrorCode[ErrorCode["BAD_NETWORK_ID"] = 7] = "BAD_NETWORK_ID";
49
+ ErrorCode[ErrorCode["REQUEST_TOO_BIG"] = 8] = "REQUEST_TOO_BIG";
50
+ ErrorCode[ErrorCode["EMPTY_REQUEST"] = 9] = "EMPTY_REQUEST";
51
+ ErrorCode[ErrorCode["INTERNAL_ERROR"] = 10] = "INTERNAL_ERROR";
52
+ ErrorCode[ErrorCode["BAD_DATA_SOURCE_ID"] = 11] = "BAD_DATA_SOURCE_ID";
53
+ ErrorCode[ErrorCode["BAD_TIMESTAMP"] = 12] = "BAD_TIMESTAMP";
54
+ ErrorCode[ErrorCode["UNKNOWN_ID"] = 21] = "UNKNOWN_ID";
55
+ })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
56
+ protobuf_1.proto2.util.setEnumType(ErrorCode, 'ErrorCode', [
57
+ { no: 0, name: 'NO_ERROR' },
58
+ { no: 1, name: 'PARTIAL_SUCCESS' },
59
+ { no: 2, name: 'PERMISSION_DENIED' },
60
+ { no: 3, name: 'BAD_DATA' },
61
+ { no: 4, name: 'BAD_COOKIE' },
62
+ { no: 5, name: 'BAD_ATTRIBUTE_ID' },
63
+ { no: 7, name: 'BAD_NETWORK_ID' },
64
+ { no: 8, name: 'REQUEST_TOO_BIG' },
65
+ { no: 9, name: 'EMPTY_REQUEST' },
66
+ { no: 10, name: 'INTERNAL_ERROR' },
67
+ { no: 11, name: 'BAD_DATA_SOURCE_ID' },
68
+ { no: 12, name: 'BAD_TIMESTAMP' },
69
+ { no: 21, name: 'UNKNOWN_ID' }
70
+ ]);
71
+ class UserDataOperation extends protobuf_1.Message {
72
+ constructor(data) {
73
+ super();
74
+ protobuf_1.proto2.util.initPartial(data, this);
75
+ }
76
+ static fromBinary(bytes, options) {
77
+ return new UserDataOperation().fromBinary(bytes, options);
78
+ }
79
+ static fromJson(jsonValue, options) {
80
+ return new UserDataOperation().fromJson(jsonValue, options);
81
+ }
82
+ static fromJsonString(jsonString, options) {
83
+ return new UserDataOperation().fromJsonString(jsonString, options);
84
+ }
85
+ static equals(a, b) {
86
+ return protobuf_1.proto2.util.equals(UserDataOperation, a, b);
87
+ }
88
+ }
89
+ exports.UserDataOperation = UserDataOperation;
90
+ UserDataOperation.runtime = protobuf_1.proto2;
91
+ UserDataOperation.typeName = 'UserDataOperation';
92
+ UserDataOperation.fields = protobuf_1.proto2.util.newFieldList(() => [
93
+ { no: 1, name: 'user_id', kind: 'scalar', T: 9, opt: true, default: '' },
94
+ {
95
+ no: 14,
96
+ name: 'user_id_type',
97
+ kind: 'enum',
98
+ T: protobuf_1.proto2.getEnumType(UserIdType),
99
+ opt: true,
100
+ default: UserIdType.GOOGLE_USER_ID
101
+ },
102
+ {
103
+ no: 4,
104
+ name: 'user_list_id',
105
+ kind: 'scalar',
106
+ T: 3,
107
+ opt: true,
108
+ default: protobuf_1.protoInt64.parse('0')
109
+ },
110
+ {
111
+ no: 5,
112
+ name: 'time_added_to_user_list',
113
+ kind: 'scalar',
114
+ T: 3,
115
+ opt: true,
116
+ default: protobuf_1.protoInt64.parse('0')
117
+ },
118
+ {
119
+ no: 8,
120
+ name: 'time_added_to_user_list_in_usec',
121
+ kind: 'scalar',
122
+ T: 3,
123
+ opt: true,
124
+ default: protobuf_1.protoInt64.parse('0')
125
+ },
126
+ { no: 6, name: 'delete', kind: 'scalar', T: 8, opt: true, default: false },
127
+ { no: 12, name: 'opt_out', kind: 'scalar', T: 8, opt: true, default: false },
128
+ { no: 7, name: 'data_source_id', kind: 'scalar', T: 5, opt: true, default: 0 }
129
+ ]);
130
+ class UpdateUsersDataRequest extends protobuf_1.Message {
131
+ constructor(data) {
132
+ super();
133
+ this.ops = [];
134
+ protobuf_1.proto2.util.initPartial(data, this);
135
+ }
136
+ static fromBinary(bytes, options) {
137
+ return new UpdateUsersDataRequest().fromBinary(bytes, options);
138
+ }
139
+ static fromJson(jsonValue, options) {
140
+ return new UpdateUsersDataRequest().fromJson(jsonValue, options);
141
+ }
142
+ static fromJsonString(jsonString, options) {
143
+ return new UpdateUsersDataRequest().fromJsonString(jsonString, options);
144
+ }
145
+ static equals(a, b) {
146
+ return protobuf_1.proto2.util.equals(UpdateUsersDataRequest, a, b);
147
+ }
148
+ }
149
+ exports.UpdateUsersDataRequest = UpdateUsersDataRequest;
150
+ UpdateUsersDataRequest.runtime = protobuf_1.proto2;
151
+ UpdateUsersDataRequest.typeName = 'UpdateUsersDataRequest';
152
+ UpdateUsersDataRequest.fields = protobuf_1.proto2.util.newFieldList(() => [
153
+ { no: 1, name: 'ops', kind: 'message', T: UserDataOperation, repeated: true },
154
+ { no: 2, name: 'send_notifications', kind: 'scalar', T: 8, opt: true, default: false }
155
+ ]);
156
+ class ErrorInfo extends protobuf_1.Message {
157
+ constructor(data) {
158
+ super();
159
+ protobuf_1.proto2.util.initPartial(data, this);
160
+ }
161
+ static fromBinary(bytes, options) {
162
+ return new ErrorInfo().fromBinary(bytes, options);
163
+ }
164
+ static fromJson(jsonValue, options) {
165
+ return new ErrorInfo().fromJson(jsonValue, options);
166
+ }
167
+ static fromJsonString(jsonString, options) {
168
+ return new ErrorInfo().fromJsonString(jsonString, options);
169
+ }
170
+ static equals(a, b) {
171
+ return protobuf_1.proto2.util.equals(ErrorInfo, a, b);
172
+ }
173
+ }
174
+ exports.ErrorInfo = ErrorInfo;
175
+ ErrorInfo.runtime = protobuf_1.proto2;
176
+ ErrorInfo.typeName = 'ErrorInfo';
177
+ ErrorInfo.fields = protobuf_1.proto2.util.newFieldList(() => [
178
+ {
179
+ no: 2,
180
+ name: 'user_list_id',
181
+ kind: 'scalar',
182
+ T: 3,
183
+ opt: true,
184
+ default: protobuf_1.protoInt64.parse('0')
185
+ },
186
+ { no: 3, name: 'user_id', kind: 'scalar', T: 9, opt: true, default: '' },
187
+ {
188
+ no: 7,
189
+ name: 'user_id_type',
190
+ kind: 'enum',
191
+ T: protobuf_1.proto2.getEnumType(UserIdType),
192
+ opt: true,
193
+ default: UserIdType.GOOGLE_USER_ID
194
+ },
195
+ { no: 4, name: 'error_code', kind: 'enum', T: protobuf_1.proto2.getEnumType(ErrorCode), opt: true }
196
+ ]);
197
+ class NotificationInfo extends protobuf_1.Message {
198
+ constructor(data) {
199
+ super();
200
+ protobuf_1.proto2.util.initPartial(data, this);
201
+ }
202
+ static fromBinary(bytes, options) {
203
+ return new NotificationInfo().fromBinary(bytes, options);
204
+ }
205
+ static fromJson(jsonValue, options) {
206
+ return new NotificationInfo().fromJson(jsonValue, options);
207
+ }
208
+ static fromJsonString(jsonString, options) {
209
+ return new NotificationInfo().fromJsonString(jsonString, options);
210
+ }
211
+ static equals(a, b) {
212
+ return protobuf_1.proto2.util.equals(NotificationInfo, a, b);
213
+ }
214
+ }
215
+ exports.NotificationInfo = NotificationInfo;
216
+ NotificationInfo.runtime = protobuf_1.proto2;
217
+ NotificationInfo.typeName = 'NotificationInfo';
218
+ NotificationInfo.fields = protobuf_1.proto2.util.newFieldList(() => [
219
+ { no: 1, name: 'user_id', kind: 'scalar', T: 9, opt: true, default: '' },
220
+ { no: 2, name: 'notification_code', kind: 'enum', T: protobuf_1.proto2.getEnumType(NotificationCode), opt: true }
221
+ ]);
222
+ class UpdateUsersDataResponse extends protobuf_1.Message {
223
+ constructor(data) {
224
+ super();
225
+ this.errors = [];
226
+ this.notifications = [];
227
+ protobuf_1.proto2.util.initPartial(data, this);
228
+ }
229
+ static fromBinary(bytes, options) {
230
+ return new UpdateUsersDataResponse().fromBinary(bytes, options);
231
+ }
232
+ static fromJson(jsonValue, options) {
233
+ return new UpdateUsersDataResponse().fromJson(jsonValue, options);
234
+ }
235
+ static fromJsonString(jsonString, options) {
236
+ return new UpdateUsersDataResponse().fromJsonString(jsonString, options);
237
+ }
238
+ static equals(a, b) {
239
+ return protobuf_1.proto2.util.equals(UpdateUsersDataResponse, a, b);
240
+ }
241
+ }
242
+ exports.UpdateUsersDataResponse = UpdateUsersDataResponse;
243
+ UpdateUsersDataResponse.runtime = protobuf_1.proto2;
244
+ UpdateUsersDataResponse.typeName = 'UpdateUsersDataResponse';
245
+ UpdateUsersDataResponse.fields = protobuf_1.proto2.util.newFieldList(() => [
246
+ { no: 1, name: 'status', kind: 'enum', T: protobuf_1.proto2.getEnumType(ErrorCode), opt: true },
247
+ { no: 2, name: 'errors', kind: 'message', T: ErrorInfo, repeated: true },
248
+ { no: 3, name: 'notifications', kind: 'message', T: NotificationInfo, repeated: true },
249
+ { no: 4, name: 'notification_status', kind: 'enum', T: protobuf_1.proto2.getEnumType(NotificationStatus), opt: true }
250
+ ]);
251
+ //# sourceMappingURL=protofile.js.map