@ductape/sdk 0.0.3-beta6 → 0.0.3-beta8

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.
@@ -4,7 +4,7 @@ import { IActionDataParserInput, IActionRequest, ICreateProductsBuilder, IFeatur
4
4
  import { IProductNotification, INotificationEnv, IProductNotificationTemplate, IProductMessageBroker, IProductMessageBrokerTopic } from '../../types/processor.types';
5
5
  import { IParsedSample } from '../../types/inputs.types';
6
6
  export interface IProductsBuilderService {
7
- fetchThirdPartyAppByAccessTag(access_tag: string): Promise<IApp & IVersion>;
7
+ fetchThirdPartyAppByAccessTag(access_tag: string): Promise<(IApp & IVersion) | null>;
8
8
  createProduct(data: ICreateProductsBuilder): Promise<void>;
9
9
  updateProduct(data: Partial<IProduct>): Promise<void>;
10
10
  initializeProduct(product_id: string): Promise<void>;
@@ -12,46 +12,46 @@ export interface IProductsBuilderService {
12
12
  initializeProductByTag(tag: string): Promise<void>;
13
13
  createEnv(data: Partial<IProductEnv>): Promise<void>;
14
14
  updateEnv(slug: string, data: Partial<IProductEnv>): Promise<void>;
15
- fetchEnv(slug: string): IProductEnv;
15
+ fetchEnv(slug: string): IProductEnv | null;
16
16
  fetchEnvs(): Array<IProductEnv>;
17
17
  createFunction(data: Partial<IProductFunction>): Promise<void>;
18
18
  updateFunction(tag: string, data: Partial<IProductFunction>): Promise<void>;
19
- fetchFunction(tag: string): IProductFunction;
19
+ fetchFunction(tag: string): IProductFunction | null;
20
20
  fetchFunctions(): Array<IProductFunction>;
21
21
  createCache(data: Partial<IProductCache>, throwErrorIfExists?: boolean): Promise<void>;
22
22
  updateCache(tag: string, data: Partial<IProductCache>): Promise<void>;
23
- fetchCache(tag: string): IProductCache;
23
+ fetchCache(tag: string): IProductCache | null;
24
24
  fetchCaches(): Array<IProductCache>;
25
25
  createStorage(data: Partial<IProductStorage>): Promise<void>;
26
26
  updateStorage(tag: string, data: Partial<IProductStorage>): Promise<void>;
27
- fetchStorage(tag: string): IProductStorage;
27
+ fetchStorage(tag: string): IProductStorage | null;
28
28
  fetchStorages(): Array<IProductStorage>;
29
29
  createNotification(data: Partial<IProductNotification>): Promise<void>;
30
30
  updateNotification(tag: string, data: Partial<IProductNotification>): Promise<void>;
31
- fetchNotification(tag: string): IProductNotification | INotificationEnv;
31
+ fetchNotification(tag: string): IProductNotification | INotificationEnv | null;
32
32
  fetchNotifications(): Array<IProductNotification>;
33
33
  createMessageBroker(data: Partial<IProductMessageBroker>): Promise<void>;
34
34
  updateMessageBroker(tag: string, data: Partial<IProductMessageBroker>): Promise<void>;
35
- fetchMessageBroker(tag: string): IProductMessageBroker;
35
+ fetchMessageBroker(tag: string): IProductMessageBroker | null;
36
36
  fetchMessageBrokers(): Array<IProductMessageBroker>;
37
37
  createMessageBrokerTopic(data: Partial<IProductMessageBrokerTopic>): Promise<void>;
38
38
  updateMessageBrokerTopic(data: Partial<IProductMessageBrokerTopic>): Promise<void>;
39
- fetchMessageBrokerTopic(tag: string): IProductMessageBrokerTopic;
39
+ fetchMessageBrokerTopic(tag: string): IProductMessageBrokerTopic | null;
40
40
  fetchMessageBrokerTopics(messageBrokerTag: string): Array<IProductMessageBrokerTopic>;
41
41
  createQuota(data: Partial<IProductQuota>): Promise<void>;
42
42
  updateQuota(tag: string, data: Partial<IProductQuota>): Promise<void>;
43
- fetchQuota(tag: string): IProductQuota;
43
+ fetchQuota(tag: string): IProductQuota | null;
44
44
  fetchQuotas(): Array<IProductQuota>;
45
45
  createFallback(data: Partial<IProductFallback>): Promise<void>;
46
46
  updateFallback(tag: string, data: Partial<IProductFallback>): Promise<void>;
47
- fetchFallback(tag: string): IProductFallback;
47
+ fetchFallback(tag: string): IProductFallback | null;
48
48
  fetchFallbacks(): Array<IProductFallback>;
49
49
  createNotificationMessage(data: Partial<IProductNotificationTemplate>): Promise<void>;
50
50
  updateNotificationMessage(data: Partial<IProductNotificationTemplate>): Promise<void>;
51
- fetchNotificationMessage(tag: string): IProductNotificationTemplate;
51
+ fetchNotificationMessage(tag: string): IProductNotificationTemplate | null;
52
52
  fetchNotificationMessages(notificationTag: string): Array<IProductNotificationTemplate>;
53
53
  updateApp(tag: string, data: Partial<IProductApp>): Promise<void>;
54
- fetchApp(tag: string): IProductApp;
54
+ fetchApp(tag: string): IProductApp | null;
55
55
  fetchApps(): Array<IProductApp>;
56
56
  addApp(app: IProductApp, throwErrorIfExists?: boolean): Promise<void>;
57
57
  createFeature(data: Partial<IProductFeature>, throwErrorIfExists?: boolean): Promise<void>;
@@ -60,15 +60,15 @@ export interface IProductsBuilderService {
60
60
  fetchFeatures(): Array<IProductFeature>;
61
61
  createDatabase(data: Partial<IProductDatabase>, throwErrorIfExists?: boolean): Promise<void>;
62
62
  updateDatabase(tag: string, data: Partial<IProductDatabase>): Promise<void>;
63
- fetchDatabase(tag: string): IProductDatabase;
63
+ fetchDatabase(tag: string): IProductDatabase | null;
64
64
  fetchDatabases(): Array<IProductDatabase>;
65
65
  createDatabaseAction(data: Partial<IProductDatabaseAction>, throwErrorIfExists?: boolean): Promise<void>;
66
66
  updateDatabaseAction(data: Partial<IProductDatabaseAction>): Promise<void>;
67
- fetchDatabaseAction(tag: string): IProductDatabaseAction;
67
+ fetchDatabaseAction(tag: string): IProductDatabaseAction | null;
68
68
  fetchDatabaseActions(databaseTag: string): Array<IProductDatabaseAction>;
69
69
  createDatabaseMigration(data: Partial<IProductDatabaseMigration>, throwErrorIfExists?: boolean): Promise<void>;
70
70
  updateDatabaseMigration(data: Partial<IProductDatabaseMigration>): Promise<void>;
71
- fetchDatabaseMigration(tag: string): IProductDatabaseMigration;
71
+ fetchDatabaseMigration(tag: string): IProductDatabaseMigration | null;
72
72
  fetchDatabaseMigrations(databaseTag: string): Array<IProductDatabaseMigration>;
73
73
  createJob(data: Partial<IProductJobs>, throwErrorIfExists?: boolean): Promise<void>;
74
74
  updateJob(tag: string, data: Partial<IProductJobs>): Promise<void>;
@@ -108,30 +108,30 @@ export default class ProductsBuilderService implements IProductsBuilderService {
108
108
  fetchProduct(): IProduct;
109
109
  createMessageBrokerTopic(data: Partial<IProductMessageBrokerTopic>, throwErrorIfExists?: boolean): Promise<void>;
110
110
  updateMessageBrokerTopic(data: Partial<IProductMessageBrokerTopic>): Promise<void>;
111
- fetchMessageBrokerTopic(tag: string, throwErrorIfExists?: boolean): IProductMessageBrokerTopic;
111
+ fetchMessageBrokerTopic(tag: string, throwErrorIfExists?: boolean): IProductMessageBrokerTopic | null;
112
112
  fetchMessageBrokerTopics(messageBrokerTag: string): Array<IProductMessageBrokerTopic>;
113
113
  validateQuotaFallbackInputAndOutput(data: Partial<IProductQuota> | Partial<IProductFallback>): Promise<void>;
114
114
  validateQuotaFallbackInput(option: IQuotaOptions | IFallbackOptions, input: Record<string, IFeatureInput>): Promise<void>;
115
115
  validateQuotaFallbackOutput(option: IQuotaOptions | IFallbackOptions, pastResponse: Record<string, unknown> | null, input: Record<string, IFeatureInput>): Promise<void>;
116
116
  createQuota(data: Partial<IProductQuota>): Promise<void>;
117
117
  updateQuota(tag: string, data: Partial<IProductQuota>): Promise<void>;
118
- fetchQuota(tag: string): IProductQuota;
118
+ fetchQuota(tag: string): IProductQuota | null;
119
119
  fetchQuotas(): Array<IProductQuota>;
120
120
  createFallback(data: Partial<IProductFallback>): Promise<void>;
121
121
  updateFallback(tag: string, data: Partial<IProductFallback>): Promise<void>;
122
- fetchFallback(tag: string): IProductFallback;
122
+ fetchFallback(tag: string): IProductFallback | null;
123
123
  fetchFallbacks(): Array<IProductFallback>;
124
124
  createEnv(data: IProductEnv, throwErrorIfExists?: boolean): Promise<void>;
125
125
  updateEnv(slug: string, data: Partial<IProductEnv>): Promise<void>;
126
126
  fetchEnvs(): IProductEnv[];
127
- fetchEnv(slug: string, throwErrorIfExists?: boolean): IProductEnv;
127
+ fetchEnv(slug: string, throwErrorIfExists?: boolean): IProductEnv | null;
128
128
  createMessageBroker(data: Partial<IProductMessageBroker>, throwErrorIfExists?: boolean): Promise<void>;
129
129
  updateMessageBroker(tag: string, data: Partial<IProductMessageBroker>): Promise<void>;
130
- fetchMessageBroker(tag: string, throwErrorIfExists?: boolean): IProductMessageBroker;
130
+ fetchMessageBroker(tag: string, throwErrorIfExists?: boolean): IProductMessageBroker | null;
131
131
  fetchMessageBrokers(): Array<IProductMessageBroker>;
132
132
  createStorage(data: Partial<IProductStorage>, throwErrorIfExists?: boolean): Promise<void>;
133
133
  updateStorage(tag: string, data: Partial<IProductStorage>): Promise<void>;
134
- fetchStorage(tag: string, throwErrorIfExists?: boolean): IProductStorage;
134
+ fetchStorage(tag: string, throwErrorIfExists?: boolean): IProductStorage | null;
135
135
  fetchStorages(): Array<IProductStorage>;
136
136
  private validateAppData;
137
137
  private validateVariablesSchema;
@@ -143,18 +143,18 @@ export default class ProductsBuilderService implements IProductsBuilderService {
143
143
  fetchAppWebhooks(access_tag: string): Promise<Array<IAppWebhook>>;
144
144
  updateApp(access_tag: string, data: Partial<IProductApp>): Promise<void>;
145
145
  fetchApps(): Array<IProductApp>;
146
- fetchApp(tag: string, throwErrorIfExists?: boolean): IProductApp;
146
+ fetchApp(tag: string, throwErrorIfExists?: boolean): IProductApp | null;
147
147
  createFunction(data: Partial<IProductFunction>, throwErrorIfExists?: boolean): Promise<void>;
148
148
  updateFunction(tag: string, data: Partial<IProductFunction>): Promise<void>;
149
149
  fetchFunctions(): Array<IProductFunction>;
150
- fetchFunction(tag: string): IProductFunction;
150
+ fetchFunction(tag: string): IProductFunction | null;
151
151
  createCache(data: Partial<IProductCache>, throwErrorIfExists?: boolean): Promise<void>;
152
152
  updateCache(tag: string, data: Partial<IProductCache>): Promise<void>;
153
- fetchCache(tag: string, throwErrorIfExists?: boolean): IProductCache;
153
+ fetchCache(tag: string, throwErrorIfExists?: boolean): IProductCache | null;
154
154
  fetchCaches(): Array<IProductCache>;
155
155
  createNotification(data: Partial<IProductNotification>, throwErrorIfExists?: boolean): Promise<void>;
156
156
  createNotificationMessage(data: Partial<IProductNotificationTemplate>, throwErrorIfExists?: boolean): Promise<void>;
157
- fetchNotificationMessage(tag: string, throwErrorIfExists?: boolean): IProductNotificationTemplate;
157
+ fetchNotificationMessage(tag: string, throwErrorIfExists?: boolean): IProductNotificationTemplate | null;
158
158
  fetchNotificationMessages(notificationTag: string, throwErrorIfExists?: boolean): Array<IProductNotificationTemplate>;
159
159
  updateNotificationMessage(data: Partial<IProductNotificationTemplate>): Promise<void>;
160
160
  updateNotification(tag: string, data: Partial<IProductNotification>): Promise<void>;
@@ -195,31 +195,31 @@ export default class ProductsBuilderService implements IProductsBuilderService {
195
195
  parseInputString(payload: IParseInputStringInput, meta: IParseInputStringMetaData): Promise<void>;
196
196
  compareInputWithExpectedInput(datapoint: IParsedSample, found_input: IParsedSample, value: string): void;
197
197
  extractStages(input: string): Array<string>;
198
- fetchSequenceEvent(sequence: IFeatureSequence, event: string): IFeatureEvent;
198
+ fetchSequenceEvent(sequence: IFeatureSequence, event: string): IFeatureEvent | null;
199
199
  fetchPriorSequence(meta: IParseInputStringMetaData, stage: string): IFeatureSequence;
200
200
  validateActionKeyPlacement(data: IParseActionEventInput): IParsedSample;
201
201
  fetchThirdPartyAppByAccessTag(access_tag: string): Promise<IApp & IVersion>;
202
202
  fetchThirdPartyAppActionByTag(actions: Array<IAppAction>, action_tag: string): IAppAction;
203
203
  createFeature(data: Partial<IProductFeature>, throwErrorIfExists?: boolean): Promise<void>;
204
204
  updateFeature(tag: string, data: Partial<IProductFeature>): Promise<void>;
205
- fetchFeature(tag: string, throwErrorIfExists?: boolean): IProductFeature;
205
+ fetchFeature(tag: string, throwErrorIfExists?: boolean): IProductFeature | null;
206
206
  fetchFeatures(): Array<IProductFeature>;
207
207
  createDatabase(data: Partial<IProductDatabase>, throwErrorIfExists?: boolean): Promise<void>;
208
208
  updateDatabase(tag: string, data: Partial<IProductDatabase>): Promise<void>;
209
- fetchDatabase(tag: string, throwErrorIfExists?: boolean): IProductDatabase;
209
+ fetchDatabase(tag: string, throwErrorIfExists?: boolean): IProductDatabase | null;
210
210
  fetchDatabases(): Array<IProductDatabase>;
211
211
  createDatabaseAction(data: Partial<IProductDatabaseAction>, throwErrorIfExists?: boolean): Promise<void>;
212
- fetchDatabaseAction(tag: string, throwErrorIfExists?: boolean): IProductDatabaseAction;
212
+ fetchDatabaseAction(tag: string, throwErrorIfExists?: boolean): IProductDatabaseAction | null;
213
213
  updateDatabaseAction(data: Partial<IProductDatabaseAction>): Promise<void>;
214
214
  fetchDatabaseActions(databaseTag: string): Array<IProductDatabaseAction>;
215
215
  createDatabaseMigration(data: Partial<IProductDatabaseMigration>, throwErrorIfExists?: boolean): Promise<void>;
216
216
  updateDatabaseMigration(data: Partial<IProductDatabaseMigration>): Promise<void>;
217
- fetchDatabaseMigration(tag: string, throwError?: boolean): IProductDatabaseMigration;
217
+ fetchDatabaseMigration(tag: string, throwError?: boolean): IProductDatabaseMigration | null;
218
218
  fetchDatabaseMigrations(databaseTag: string): Array<IProductDatabaseMigration>;
219
219
  validateJobEvent(data: Partial<IProductJobs>): Promise<void>;
220
220
  createJob(data: Partial<IProductJobs>, throwErrorIfExists?: boolean): Promise<void>;
221
221
  updateJob(tag: string, data: Partial<IProductJobs>): Promise<void>;
222
- fetchJob(tag: string, throwError?: boolean): IProductJobs;
222
+ fetchJob(tag: string, throwError?: boolean): IProductJobs | null;
223
223
  fetchJobs(): Array<IProductJobs>;
224
224
  private getUserAccess;
225
225
  }
@@ -599,7 +599,7 @@ class ProductsBuilderService {
599
599
  if (data.tag && this.fetchMessageBroker(data.tag)) {
600
600
  throw new Error(`tag ${tag} is in use`); // TODO: also check on the backend
601
601
  }
602
- console.log("2", data.envs);
602
+ console.log('2', data.envs);
603
603
  data.envs = data.envs.map((env) => {
604
604
  const exists = this.fetchEnv(env.slug);
605
605
  if (!exists) {
@@ -662,6 +662,7 @@ class ProductsBuilderService {
662
662
  return messageBroker;
663
663
  }
664
664
  fetchMessageBrokers() {
665
+ console.log("PROD!", this.product);
665
666
  return this.product.messageBrokers.map((broker) => {
666
667
  return this.fetchMessageBroker(broker.tag);
667
668
  });
@@ -1054,8 +1055,7 @@ class ProductsBuilderService {
1054
1055
  }
1055
1056
  fetchFunction(tag) {
1056
1057
  const func = this.product.functions.find((data) => data.tag === tag);
1057
- if (!func)
1058
- throw new Error(`Function ${tag} not found`);
1058
+ // if (!func) throw new Error(`Function ${tag} not found`);
1059
1059
  return func;
1060
1060
  }
1061
1061
  async createCache(data, throwErrorIfExists = false) {
@@ -1467,7 +1467,7 @@ class ProductsBuilderService {
1467
1467
  await this.validateActionDataInput(data, func, event.input, event_index, sequence_index);
1468
1468
  }
1469
1469
  async checkAndValidateDBActionDataInput(data, sequence_index, event, event_index) {
1470
- console.log("EVENTY", event.event);
1470
+ console.log('EVENTY', event.event);
1471
1471
  const { filterData, data: dbData, filterTemplate, template } = this.fetchDatabaseAction(event.event);
1472
1472
  await this.validateDBActionDataInput(data, { filterData, data: dbData, template, filter: filterTemplate }, event.input, event_index, sequence_index);
1473
1473
  }
@@ -1607,7 +1607,11 @@ class ProductsBuilderService {
1607
1607
  const _a = event_input.email, { recipients } = _a, email = __rest(_a, ["recipients"]);
1608
1608
  await this.validateActionInputData({
1609
1609
  obj: email.subject,
1610
- sample: { type: enums_1.InputsTypes.JSON, sample: '', data: action.email.filter((value) => value.parent_key === 'subject') },
1610
+ sample: {
1611
+ type: enums_1.InputsTypes.JSON,
1612
+ sample: '',
1613
+ data: action.email.filter((value) => value.parent_key === 'subject'),
1614
+ },
1611
1615
  event_index,
1612
1616
  sequence_index,
1613
1617
  feature: data,
@@ -1616,7 +1620,11 @@ class ProductsBuilderService {
1616
1620
  }, true);
1617
1621
  await this.validateActionInputData({
1618
1622
  obj: email.template,
1619
- sample: { type: enums_1.InputsTypes.JSON, sample: '', data: action.email.filter((value) => value.parent_key === 'template') },
1623
+ sample: {
1624
+ type: enums_1.InputsTypes.JSON,
1625
+ sample: '',
1626
+ data: action.email.filter((value) => value.parent_key === 'template'),
1627
+ },
1620
1628
  event_index,
1621
1629
  sequence_index,
1622
1630
  feature: data,
@@ -1628,7 +1636,11 @@ class ProductsBuilderService {
1628
1636
  const _b = event_input.push_notification, { device_tokens } = _b, push_notification = __rest(_b, ["device_tokens"]);
1629
1637
  await this.validateActionInputData({
1630
1638
  obj: push_notification.body,
1631
- sample: { type: enums_1.InputsTypes.JSON, sample: '', data: action.notification.filter((value) => value.parent_key === 'body') },
1639
+ sample: {
1640
+ type: enums_1.InputsTypes.JSON,
1641
+ sample: '',
1642
+ data: action.notification.filter((value) => value.parent_key === 'body'),
1643
+ },
1632
1644
  event_index,
1633
1645
  sequence_index,
1634
1646
  feature: data,
@@ -1636,10 +1648,14 @@ class ProductsBuilderService {
1636
1648
  indexes: Object.assign(Object.assign({}, indexes), { parent_key: 'body', level: 1 }),
1637
1649
  }, true);
1638
1650
  if (push_notification.data) {
1639
- console.log("JUMANJI", push_notification.data);
1651
+ console.log('JUMANJI', push_notification.data);
1640
1652
  await this.validateActionInputData({
1641
1653
  obj: push_notification.data,
1642
- sample: { type: enums_1.InputsTypes.JSON, sample: '', data: action.notification.filter((value) => value.parent_key === 'data') },
1654
+ sample: {
1655
+ type: enums_1.InputsTypes.JSON,
1656
+ sample: '',
1657
+ data: action.notification.filter((value) => value.parent_key === 'data'),
1658
+ },
1643
1659
  event_index,
1644
1660
  sequence_index,
1645
1661
  feature: data,
@@ -1650,7 +1666,11 @@ class ProductsBuilderService {
1650
1666
  if (push_notification.title)
1651
1667
  await this.validateActionInputData({
1652
1668
  obj: push_notification.title,
1653
- sample: { type: enums_1.InputsTypes.JSON, sample: '', data: action.notification.filter((value) => value.parent_key === 'title') },
1669
+ sample: {
1670
+ type: enums_1.InputsTypes.JSON,
1671
+ sample: '',
1672
+ data: action.notification.filter((value) => value.parent_key === 'title'),
1673
+ },
1654
1674
  event_index,
1655
1675
  sequence_index,
1656
1676
  feature: data,
@@ -1915,7 +1935,7 @@ class ProductsBuilderService {
1915
1935
  //console.log(payload)
1916
1936
  return;
1917
1937
  }
1918
- if ((this.isQuotaFallbackInput) && (0, string_utils_1.startsWithAny)(value, ['$Sequence{', '$Response{'])) {
1938
+ if (this.isQuotaFallbackInput && (0, string_utils_1.startsWithAny)(value, ['$Sequence{', '$Response{'])) {
1919
1939
  throw new Error(`Value ${value} cannot be a $Sequence or $Response value when defining Quota & Fallback input`);
1920
1940
  }
1921
1941
  if (value.startsWith('$Input{')) {
@@ -2244,14 +2264,11 @@ class ProductsBuilderService {
2244
2264
  enums_1.DataTypes.NUMBER_STRING,
2245
2265
  enums_1.DataTypes.INTEGER,
2246
2266
  ];
2247
- const dateTypes = [
2248
- enums_1.DataTypes.DATE,
2249
- enums_1.DataTypes.DATE_STRING
2250
- ];
2251
- const strException = ((datapoint.type === enums_1.DataTypes.STRING || found_input.type === enums_1.DataTypes.STRING) &&
2252
- (strTypes.includes(found_input.type) || strTypes.includes(datapoint.type)));
2253
- const dateException = ((datapoint.type === enums_1.DataTypes.INTEGER || found_input.type === enums_1.DataTypes.INTEGER) &&
2254
- (dateTypes.includes(found_input.type) || dateTypes.includes(datapoint.type)));
2267
+ const dateTypes = [enums_1.DataTypes.DATE, enums_1.DataTypes.DATE_STRING];
2268
+ const strException = (datapoint.type === enums_1.DataTypes.STRING || found_input.type === enums_1.DataTypes.STRING) &&
2269
+ (strTypes.includes(found_input.type) || strTypes.includes(datapoint.type));
2270
+ const dateException = (datapoint.type === enums_1.DataTypes.INTEGER || found_input.type === enums_1.DataTypes.INTEGER) &&
2271
+ (dateTypes.includes(found_input.type) || dateTypes.includes(datapoint.type));
2255
2272
  if (datapoint.type !== found_input.type && !strException && !dateException) {
2256
2273
  //console.log("STR EXCEPTION", strException, found_input.type, datapoint.type)
2257
2274
  throw new Error(`${value} is required to be ${datapoint.type} not ${found_input.type}`);
@@ -2286,7 +2303,7 @@ class ProductsBuilderService {
2286
2303
  );
2287
2304
  });
2288
2305
  if (!datapoint) {
2289
- console.log("VALIDATE", data.key, data.value, actionData, indexes);
2306
+ console.log('VALIDATE', data.key, data.value, actionData, indexes);
2290
2307
  throw new Error(`Key ${data.key} not found for ${data.type} for sequence ${sequence.tag} event ${sequence.events[data.event_index].event}`);
2291
2308
  }
2292
2309
  return datapoint;