skedyul 1.7.16 → 1.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- 1786319639134
1
+ 1786330648697
package/dist/cli/index.js CHANGED
@@ -3763,8 +3763,8 @@ async function handleInstall(body, hooks) {
3763
3763
  try {
3764
3764
  const installHook = hooks.install;
3765
3765
  const installHandler = typeof installHook === "function" ? installHook : installHook.handler;
3766
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
3767
- return await runWithConfig(requestConfig, async () => {
3766
+ const result = await runWithConfig(requestConfig, async () => {
3767
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
3768
3768
  return await installHandler(installContext);
3769
3769
  });
3770
3770
  });
@@ -3831,8 +3831,8 @@ async function handleUninstall(body, hooks) {
3831
3831
  try {
3832
3832
  const uninstallHook = hooks.uninstall;
3833
3833
  const uninstallHandlerFn = typeof uninstallHook === "function" ? uninstallHook : uninstallHook.handler;
3834
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
3835
- return await runWithConfig(requestConfig, async () => {
3834
+ const result = await runWithConfig(requestConfig, async () => {
3835
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
3836
3836
  return await uninstallHandlerFn(uninstallContext);
3837
3837
  });
3838
3838
  });
@@ -3892,8 +3892,8 @@ async function handleProvision(body, hooks) {
3892
3892
  try {
3893
3893
  const provisionHook = hooks.provision;
3894
3894
  const provisionHandler = typeof provisionHook === "function" ? provisionHook : provisionHook.handler;
3895
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
3896
- return await runWithConfig(requestConfig, async () => {
3895
+ const result = await runWithConfig(requestConfig, async () => {
3896
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
3897
3897
  return await provisionHandler(provisionContext);
3898
3898
  });
3899
3899
  });
@@ -3952,14 +3952,11 @@ async function handleSetupRevalidate(body, hooks) {
3952
3952
  };
3953
3953
  try {
3954
3954
  const handler = typeof revalidateHook === "function" ? revalidateHook : revalidateHook.handler;
3955
- const result = await runWithLogContext(
3956
- { invocation: body.invocation },
3957
- async () => {
3958
- return await runWithConfig(requestConfig, async () => {
3959
- return await handler(ctx);
3960
- });
3961
- }
3962
- );
3955
+ const result = await runWithConfig(requestConfig, async () => {
3956
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
3957
+ return await handler(ctx);
3958
+ });
3959
+ });
3963
3960
  return {
3964
3961
  status: 200,
3965
3962
  body: {
@@ -4057,8 +4054,8 @@ async function handleOAuthCallback(parsedBody, hooks) {
4057
4054
  try {
4058
4055
  const oauthCallbackHook = hooks.oauth_callback;
4059
4056
  const oauthCallbackHandler = typeof oauthCallbackHook === "function" ? oauthCallbackHook : oauthCallbackHook.handler;
4060
- const result = await runWithLogContext({ invocation }, async () => {
4061
- return await runWithConfig(requestConfig, async () => {
4057
+ const result = await runWithConfig(requestConfig, async () => {
4058
+ return await runWithLogContext({ invocation }, async () => {
4062
4059
  return await oauthCallbackHandler(oauthCallbackContext);
4063
4060
  });
4064
4061
  });
@@ -4178,8 +4175,8 @@ async function executeWebhookHandler(handle, webhookRegistry, data) {
4178
4175
  invocation: data.invocation,
4179
4176
  isProvisionContext: !isRuntimeWebhookContext(data.webhookContext)
4180
4177
  };
4181
- webhookResponse = await runWithLogContext({ invocation: data.invocation }, async () => {
4182
- return await runWithConfig(requestConfig, async () => {
4178
+ webhookResponse = await runWithConfig(requestConfig, async () => {
4179
+ return await runWithLogContext({ invocation: data.invocation }, async () => {
4183
4180
  return await runWithRateLimitExecutionContext(rateLimitContext, async () => {
4184
4181
  return await webhookDef.handler(data.webhookRequest, data.webhookContext);
4185
4182
  });
@@ -1072,8 +1072,8 @@ async function handleInstall(body, hooks) {
1072
1072
  try {
1073
1073
  const installHook = hooks.install;
1074
1074
  const installHandler = typeof installHook === "function" ? installHook : installHook.handler;
1075
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1076
- return await runWithConfig(requestConfig, async () => {
1075
+ const result = await runWithConfig(requestConfig, async () => {
1076
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1077
1077
  return await installHandler(installContext);
1078
1078
  });
1079
1079
  });
@@ -1140,8 +1140,8 @@ async function handleUninstall(body, hooks) {
1140
1140
  try {
1141
1141
  const uninstallHook = hooks.uninstall;
1142
1142
  const uninstallHandlerFn = typeof uninstallHook === "function" ? uninstallHook : uninstallHook.handler;
1143
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1144
- return await runWithConfig(requestConfig, async () => {
1143
+ const result = await runWithConfig(requestConfig, async () => {
1144
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1145
1145
  return await uninstallHandlerFn(uninstallContext);
1146
1146
  });
1147
1147
  });
@@ -1201,8 +1201,8 @@ async function handleProvision(body, hooks) {
1201
1201
  try {
1202
1202
  const provisionHook = hooks.provision;
1203
1203
  const provisionHandler = typeof provisionHook === "function" ? provisionHook : provisionHook.handler;
1204
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1205
- return await runWithConfig(requestConfig, async () => {
1204
+ const result = await runWithConfig(requestConfig, async () => {
1205
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1206
1206
  return await provisionHandler(provisionContext);
1207
1207
  });
1208
1208
  });
@@ -1261,14 +1261,11 @@ async function handleSetupRevalidate(body, hooks) {
1261
1261
  };
1262
1262
  try {
1263
1263
  const handler = typeof revalidateHook === "function" ? revalidateHook : revalidateHook.handler;
1264
- const result = await runWithLogContext(
1265
- { invocation: body.invocation },
1266
- async () => {
1267
- return await runWithConfig(requestConfig, async () => {
1268
- return await handler(ctx);
1269
- });
1270
- }
1271
- );
1264
+ const result = await runWithConfig(requestConfig, async () => {
1265
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1266
+ return await handler(ctx);
1267
+ });
1268
+ });
1272
1269
  return {
1273
1270
  status: 200,
1274
1271
  body: {
@@ -1366,8 +1363,8 @@ async function handleOAuthCallback(parsedBody, hooks) {
1366
1363
  try {
1367
1364
  const oauthCallbackHook = hooks.oauth_callback;
1368
1365
  const oauthCallbackHandler = typeof oauthCallbackHook === "function" ? oauthCallbackHook : oauthCallbackHook.handler;
1369
- const result = await runWithLogContext({ invocation }, async () => {
1370
- return await runWithConfig(requestConfig, async () => {
1366
+ const result = await runWithConfig(requestConfig, async () => {
1367
+ return await runWithLogContext({ invocation }, async () => {
1371
1368
  return await oauthCallbackHandler(oauthCallbackContext);
1372
1369
  });
1373
1370
  });
@@ -1487,8 +1484,8 @@ async function executeWebhookHandler(handle, webhookRegistry, data) {
1487
1484
  invocation: data.invocation,
1488
1485
  isProvisionContext: !isRuntimeWebhookContext(data.webhookContext)
1489
1486
  };
1490
- webhookResponse = await runWithLogContext({ invocation: data.invocation }, async () => {
1491
- return await runWithConfig(requestConfig, async () => {
1487
+ webhookResponse = await runWithConfig(requestConfig, async () => {
1488
+ return await runWithLogContext({ invocation: data.invocation }, async () => {
1492
1489
  return await runWithRateLimitExecutionContext(rateLimitContext, async () => {
1493
1490
  return await webhookDef.handler(data.webhookRequest, data.webhookContext);
1494
1491
  });
@@ -1340,6 +1340,14 @@ var EntityRelationshipDefinitionSchema = z8.object({
1340
1340
  targetEntity: z8.string().optional(),
1341
1341
  description: z8.string().optional()
1342
1342
  });
1343
+ var EntityCrmMapDefaultsSchema = z8.object({
1344
+ modelHandle: z8.string(),
1345
+ matchFieldHandle: z8.string().optional(),
1346
+ matchRuleEntityPaths: z8.array(z8.string()).optional(),
1347
+ fieldHandles: z8.record(z8.string(), z8.string()),
1348
+ relationshipHandles: z8.record(z8.string(), z8.string()).optional(),
1349
+ valueAliases: z8.record(z8.string(), z8.record(z8.string(), z8.string())).optional()
1350
+ });
1343
1351
  var EntityDefinitionSchema = z8.object({
1344
1352
  handle: z8.string(),
1345
1353
  label: z8.string(),
@@ -1347,7 +1355,8 @@ var EntityDefinitionSchema = z8.object({
1347
1355
  description: z8.string().optional(),
1348
1356
  fields: z8.array(EntityFieldDefinitionSchema),
1349
1357
  contextFields: z8.array(EntityFieldDefinitionSchema).optional(),
1350
- relationships: z8.array(EntityRelationshipDefinitionSchema).optional()
1358
+ relationships: z8.array(EntityRelationshipDefinitionSchema).optional(),
1359
+ crmMapDefaults: EntityCrmMapDefaultsSchema.optional()
1351
1360
  });
1352
1361
  var RelationshipCardinalitySchema = z8.enum([
1353
1362
  "ONE_TO_ONE",
@@ -1919,7 +1928,10 @@ var SetupStepDefinitionSchema = z8.object({
1919
1928
  envKeys: z8.array(z8.string()).optional(),
1920
1929
  listenToCrm: z8.boolean().optional(),
1921
1930
  listenToEnv: z8.boolean().optional(),
1922
- capabilities: z8.array(z8.string()).optional()
1931
+ capabilities: z8.array(z8.string()).optional(),
1932
+ actionTool: z8.string().optional(),
1933
+ actionLabel: z8.string().optional(),
1934
+ href: z8.string().optional()
1923
1935
  });
1924
1936
  var BatchPaginationSchema = z8.object({
1925
1937
  hasMore: z8.boolean(),
@@ -4615,8 +4627,8 @@ async function handleInstall(body, hooks) {
4615
4627
  try {
4616
4628
  const installHook = hooks.install;
4617
4629
  const installHandler = typeof installHook === "function" ? installHook : installHook.handler;
4618
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
4619
- return await runWithConfig(requestConfig, async () => {
4630
+ const result = await runWithConfig(requestConfig, async () => {
4631
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
4620
4632
  return await installHandler(installContext);
4621
4633
  });
4622
4634
  });
@@ -4683,8 +4695,8 @@ async function handleUninstall(body, hooks) {
4683
4695
  try {
4684
4696
  const uninstallHook = hooks.uninstall;
4685
4697
  const uninstallHandlerFn = typeof uninstallHook === "function" ? uninstallHook : uninstallHook.handler;
4686
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
4687
- return await runWithConfig(requestConfig, async () => {
4698
+ const result = await runWithConfig(requestConfig, async () => {
4699
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
4688
4700
  return await uninstallHandlerFn(uninstallContext);
4689
4701
  });
4690
4702
  });
@@ -4744,8 +4756,8 @@ async function handleProvision(body, hooks) {
4744
4756
  try {
4745
4757
  const provisionHook = hooks.provision;
4746
4758
  const provisionHandler = typeof provisionHook === "function" ? provisionHook : provisionHook.handler;
4747
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
4748
- return await runWithConfig(requestConfig, async () => {
4759
+ const result = await runWithConfig(requestConfig, async () => {
4760
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
4749
4761
  return await provisionHandler(provisionContext);
4750
4762
  });
4751
4763
  });
@@ -4804,14 +4816,11 @@ async function handleSetupRevalidate(body, hooks) {
4804
4816
  };
4805
4817
  try {
4806
4818
  const handler = typeof revalidateHook === "function" ? revalidateHook : revalidateHook.handler;
4807
- const result = await runWithLogContext(
4808
- { invocation: body.invocation },
4809
- async () => {
4810
- return await runWithConfig(requestConfig, async () => {
4811
- return await handler(ctx);
4812
- });
4813
- }
4814
- );
4819
+ const result = await runWithConfig(requestConfig, async () => {
4820
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
4821
+ return await handler(ctx);
4822
+ });
4823
+ });
4815
4824
  return {
4816
4825
  status: 200,
4817
4826
  body: {
@@ -4909,8 +4918,8 @@ async function handleOAuthCallback(parsedBody, hooks) {
4909
4918
  try {
4910
4919
  const oauthCallbackHook = hooks.oauth_callback;
4911
4920
  const oauthCallbackHandler = typeof oauthCallbackHook === "function" ? oauthCallbackHook : oauthCallbackHook.handler;
4912
- const result = await runWithLogContext({ invocation }, async () => {
4913
- return await runWithConfig(requestConfig, async () => {
4921
+ const result = await runWithConfig(requestConfig, async () => {
4922
+ return await runWithLogContext({ invocation }, async () => {
4914
4923
  return await oauthCallbackHandler(oauthCallbackContext);
4915
4924
  });
4916
4925
  });
@@ -5025,8 +5034,8 @@ async function executeWebhookHandler(handle, webhookRegistry, data) {
5025
5034
  invocation: data.invocation,
5026
5035
  isProvisionContext: !isRuntimeWebhookContext(data.webhookContext)
5027
5036
  };
5028
- webhookResponse = await runWithLogContext({ invocation: data.invocation }, async () => {
5029
- return await runWithConfig(requestConfig, async () => {
5037
+ webhookResponse = await runWithConfig(requestConfig, async () => {
5038
+ return await runWithLogContext({ invocation: data.invocation }, async () => {
5030
5039
  return await runWithRateLimitExecutionContext(rateLimitContext, async () => {
5031
5040
  return await webhookDef.handler(data.webhookRequest, data.webhookContext);
5032
5041
  });
@@ -8834,6 +8843,7 @@ export {
8834
8843
  DatePickerComponentDefinitionSchema,
8835
8844
  DayOfWeekSchema,
8836
8845
  EmptyFormComponentDefinitionSchema,
8846
+ EntityCrmMapDefaultsSchema,
8837
8847
  EntityDefinitionSchema,
8838
8848
  EntityFieldDefinitionSchema,
8839
8849
  EntityRelationshipDefinitionSchema,
package/dist/index.js CHANGED
@@ -88,6 +88,7 @@ __export(index_exports, {
88
88
  DatePickerComponentDefinitionSchema: () => DatePickerComponentDefinitionSchema,
89
89
  DayOfWeekSchema: () => DayOfWeekSchema,
90
90
  EmptyFormComponentDefinitionSchema: () => EmptyFormComponentDefinitionSchema,
91
+ EntityCrmMapDefaultsSchema: () => EntityCrmMapDefaultsSchema,
91
92
  EntityDefinitionSchema: () => EntityDefinitionSchema,
92
93
  EntityFieldDefinitionSchema: () => EntityFieldDefinitionSchema,
93
94
  EntityRelationshipDefinitionSchema: () => EntityRelationshipDefinitionSchema,
@@ -1728,6 +1729,14 @@ var EntityRelationshipDefinitionSchema = import_v48.z.object({
1728
1729
  targetEntity: import_v48.z.string().optional(),
1729
1730
  description: import_v48.z.string().optional()
1730
1731
  });
1732
+ var EntityCrmMapDefaultsSchema = import_v48.z.object({
1733
+ modelHandle: import_v48.z.string(),
1734
+ matchFieldHandle: import_v48.z.string().optional(),
1735
+ matchRuleEntityPaths: import_v48.z.array(import_v48.z.string()).optional(),
1736
+ fieldHandles: import_v48.z.record(import_v48.z.string(), import_v48.z.string()),
1737
+ relationshipHandles: import_v48.z.record(import_v48.z.string(), import_v48.z.string()).optional(),
1738
+ valueAliases: import_v48.z.record(import_v48.z.string(), import_v48.z.record(import_v48.z.string(), import_v48.z.string())).optional()
1739
+ });
1731
1740
  var EntityDefinitionSchema = import_v48.z.object({
1732
1741
  handle: import_v48.z.string(),
1733
1742
  label: import_v48.z.string(),
@@ -1735,7 +1744,8 @@ var EntityDefinitionSchema = import_v48.z.object({
1735
1744
  description: import_v48.z.string().optional(),
1736
1745
  fields: import_v48.z.array(EntityFieldDefinitionSchema),
1737
1746
  contextFields: import_v48.z.array(EntityFieldDefinitionSchema).optional(),
1738
- relationships: import_v48.z.array(EntityRelationshipDefinitionSchema).optional()
1747
+ relationships: import_v48.z.array(EntityRelationshipDefinitionSchema).optional(),
1748
+ crmMapDefaults: EntityCrmMapDefaultsSchema.optional()
1739
1749
  });
1740
1750
  var RelationshipCardinalitySchema = import_v48.z.enum([
1741
1751
  "ONE_TO_ONE",
@@ -2307,7 +2317,10 @@ var SetupStepDefinitionSchema = import_v48.z.object({
2307
2317
  envKeys: import_v48.z.array(import_v48.z.string()).optional(),
2308
2318
  listenToCrm: import_v48.z.boolean().optional(),
2309
2319
  listenToEnv: import_v48.z.boolean().optional(),
2310
- capabilities: import_v48.z.array(import_v48.z.string()).optional()
2320
+ capabilities: import_v48.z.array(import_v48.z.string()).optional(),
2321
+ actionTool: import_v48.z.string().optional(),
2322
+ actionLabel: import_v48.z.string().optional(),
2323
+ href: import_v48.z.string().optional()
2311
2324
  });
2312
2325
  var BatchPaginationSchema = import_v48.z.object({
2313
2326
  hasMore: import_v48.z.boolean(),
@@ -5003,8 +5016,8 @@ async function handleInstall(body, hooks) {
5003
5016
  try {
5004
5017
  const installHook = hooks.install;
5005
5018
  const installHandler = typeof installHook === "function" ? installHook : installHook.handler;
5006
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
5007
- return await runWithConfig(requestConfig, async () => {
5019
+ const result = await runWithConfig(requestConfig, async () => {
5020
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
5008
5021
  return await installHandler(installContext);
5009
5022
  });
5010
5023
  });
@@ -5071,8 +5084,8 @@ async function handleUninstall(body, hooks) {
5071
5084
  try {
5072
5085
  const uninstallHook = hooks.uninstall;
5073
5086
  const uninstallHandlerFn = typeof uninstallHook === "function" ? uninstallHook : uninstallHook.handler;
5074
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
5075
- return await runWithConfig(requestConfig, async () => {
5087
+ const result = await runWithConfig(requestConfig, async () => {
5088
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
5076
5089
  return await uninstallHandlerFn(uninstallContext);
5077
5090
  });
5078
5091
  });
@@ -5132,8 +5145,8 @@ async function handleProvision(body, hooks) {
5132
5145
  try {
5133
5146
  const provisionHook = hooks.provision;
5134
5147
  const provisionHandler = typeof provisionHook === "function" ? provisionHook : provisionHook.handler;
5135
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
5136
- return await runWithConfig(requestConfig, async () => {
5148
+ const result = await runWithConfig(requestConfig, async () => {
5149
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
5137
5150
  return await provisionHandler(provisionContext);
5138
5151
  });
5139
5152
  });
@@ -5192,14 +5205,11 @@ async function handleSetupRevalidate(body, hooks) {
5192
5205
  };
5193
5206
  try {
5194
5207
  const handler = typeof revalidateHook === "function" ? revalidateHook : revalidateHook.handler;
5195
- const result = await runWithLogContext(
5196
- { invocation: body.invocation },
5197
- async () => {
5198
- return await runWithConfig(requestConfig, async () => {
5199
- return await handler(ctx);
5200
- });
5201
- }
5202
- );
5208
+ const result = await runWithConfig(requestConfig, async () => {
5209
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
5210
+ return await handler(ctx);
5211
+ });
5212
+ });
5203
5213
  return {
5204
5214
  status: 200,
5205
5215
  body: {
@@ -5297,8 +5307,8 @@ async function handleOAuthCallback(parsedBody, hooks) {
5297
5307
  try {
5298
5308
  const oauthCallbackHook = hooks.oauth_callback;
5299
5309
  const oauthCallbackHandler = typeof oauthCallbackHook === "function" ? oauthCallbackHook : oauthCallbackHook.handler;
5300
- const result = await runWithLogContext({ invocation }, async () => {
5301
- return await runWithConfig(requestConfig, async () => {
5310
+ const result = await runWithConfig(requestConfig, async () => {
5311
+ return await runWithLogContext({ invocation }, async () => {
5302
5312
  return await oauthCallbackHandler(oauthCallbackContext);
5303
5313
  });
5304
5314
  });
@@ -5413,8 +5423,8 @@ async function executeWebhookHandler(handle, webhookRegistry, data) {
5413
5423
  invocation: data.invocation,
5414
5424
  isProvisionContext: !isRuntimeWebhookContext(data.webhookContext)
5415
5425
  };
5416
- webhookResponse = await runWithLogContext({ invocation: data.invocation }, async () => {
5417
- return await runWithConfig(requestConfig, async () => {
5426
+ webhookResponse = await runWithConfig(requestConfig, async () => {
5427
+ return await runWithLogContext({ invocation: data.invocation }, async () => {
5418
5428
  return await runWithRateLimitExecutionContext(rateLimitContext, async () => {
5419
5429
  return await webhookDef.handler(data.webhookRequest, data.webhookContext);
5420
5430
  });
@@ -9223,6 +9233,7 @@ var index_default = { z: import_v414.z };
9223
9233
  DatePickerComponentDefinitionSchema,
9224
9234
  DayOfWeekSchema,
9225
9235
  EmptyFormComponentDefinitionSchema,
9236
+ EntityCrmMapDefaultsSchema,
9226
9237
  EntityDefinitionSchema,
9227
9238
  EntityFieldDefinitionSchema,
9228
9239
  EntityRelationshipDefinitionSchema,
package/dist/schemas.d.ts CHANGED
@@ -394,6 +394,15 @@ export declare const EntityRelationshipDefinitionSchema: z.ZodObject<{
394
394
  targetEntity: z.ZodOptional<z.ZodString>;
395
395
  description: z.ZodOptional<z.ZodString>;
396
396
  }, z.core.$strip>;
397
+ /** Suggested CRM map defaults declared on an entity (consumed generically by core). */
398
+ export declare const EntityCrmMapDefaultsSchema: z.ZodObject<{
399
+ modelHandle: z.ZodString;
400
+ matchFieldHandle: z.ZodOptional<z.ZodString>;
401
+ matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
402
+ fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
403
+ relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
404
+ valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
405
+ }, z.core.$strip>;
397
406
  export declare const EntityDefinitionSchema: z.ZodObject<{
398
407
  handle: z.ZodString;
399
408
  label: z.ZodString;
@@ -447,6 +456,14 @@ export declare const EntityDefinitionSchema: z.ZodObject<{
447
456
  targetEntity: z.ZodOptional<z.ZodString>;
448
457
  description: z.ZodOptional<z.ZodString>;
449
458
  }, z.core.$strip>>>;
459
+ crmMapDefaults: z.ZodOptional<z.ZodObject<{
460
+ modelHandle: z.ZodString;
461
+ matchFieldHandle: z.ZodOptional<z.ZodString>;
462
+ matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
463
+ fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
464
+ relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
465
+ valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
466
+ }, z.core.$strip>>;
450
467
  }, z.core.$strip>;
451
468
  export declare const RelationshipCardinalitySchema: z.ZodEnum<{
452
469
  ONE_TO_ONE: "ONE_TO_ONE";
@@ -3400,6 +3417,9 @@ export declare const SetupStepDefinitionSchema: z.ZodObject<{
3400
3417
  listenToCrm: z.ZodOptional<z.ZodBoolean>;
3401
3418
  listenToEnv: z.ZodOptional<z.ZodBoolean>;
3402
3419
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
3420
+ actionTool: z.ZodOptional<z.ZodString>;
3421
+ actionLabel: z.ZodOptional<z.ZodString>;
3422
+ href: z.ZodOptional<z.ZodString>;
3403
3423
  }, z.core.$strip>;
3404
3424
  export declare const BatchPaginationSchema: z.ZodObject<{
3405
3425
  hasMore: z.ZodBoolean;
@@ -3632,6 +3652,14 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
3632
3652
  targetEntity: z.ZodOptional<z.ZodString>;
3633
3653
  description: z.ZodOptional<z.ZodString>;
3634
3654
  }, z.core.$strip>>>;
3655
+ crmMapDefaults: z.ZodOptional<z.ZodObject<{
3656
+ modelHandle: z.ZodString;
3657
+ matchFieldHandle: z.ZodOptional<z.ZodString>;
3658
+ matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
3659
+ fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
3660
+ relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3661
+ valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
3662
+ }, z.core.$strip>>;
3635
3663
  }, z.core.$strip>>>;
3636
3664
  relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
3637
3665
  source: z.ZodObject<{
@@ -4270,6 +4298,9 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
4270
4298
  listenToCrm: z.ZodOptional<z.ZodBoolean>;
4271
4299
  listenToEnv: z.ZodOptional<z.ZodBoolean>;
4272
4300
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
4301
+ actionTool: z.ZodOptional<z.ZodString>;
4302
+ actionLabel: z.ZodOptional<z.ZodString>;
4303
+ href: z.ZodOptional<z.ZodString>;
4273
4304
  }, z.core.$strip>>>;
4274
4305
  batchOperations: z.ZodOptional<z.ZodArray<z.ZodObject<{
4275
4306
  handle: z.ZodString;
@@ -4481,6 +4512,14 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
4481
4512
  targetEntity: z.ZodOptional<z.ZodString>;
4482
4513
  description: z.ZodOptional<z.ZodString>;
4483
4514
  }, z.core.$strip>>>;
4515
+ crmMapDefaults: z.ZodOptional<z.ZodObject<{
4516
+ modelHandle: z.ZodString;
4517
+ matchFieldHandle: z.ZodOptional<z.ZodString>;
4518
+ matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
4519
+ fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
4520
+ relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4521
+ valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
4522
+ }, z.core.$strip>>;
4484
4523
  }, z.core.$strip>>>;
4485
4524
  relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
4486
4525
  source: z.ZodObject<{
@@ -5119,6 +5158,9 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
5119
5158
  listenToCrm: z.ZodOptional<z.ZodBoolean>;
5120
5159
  listenToEnv: z.ZodOptional<z.ZodBoolean>;
5121
5160
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
5161
+ actionTool: z.ZodOptional<z.ZodString>;
5162
+ actionLabel: z.ZodOptional<z.ZodString>;
5163
+ href: z.ZodOptional<z.ZodString>;
5122
5164
  }, z.core.$strip>>>;
5123
5165
  batchOperations: z.ZodOptional<z.ZodArray<z.ZodObject<{
5124
5166
  handle: z.ZodString;
@@ -5188,6 +5230,7 @@ export type ModelFieldDefinition = z.infer<typeof ModelFieldDefinitionSchema>;
5188
5230
  export type ModelDefinition = z.infer<typeof ModelDefinitionSchema>;
5189
5231
  export type EntityFieldDefinition = z.infer<typeof EntityFieldDefinitionSchema>;
5190
5232
  export type EntityRelationshipDefinition = z.infer<typeof EntityRelationshipDefinitionSchema>;
5233
+ export type EntityCrmMapDefaults = z.infer<typeof EntityCrmMapDefaultsSchema>;
5191
5234
  export type EntityDefinition = z.infer<typeof EntityDefinitionSchema>;
5192
5235
  export type ChannelCapabilityType = z.infer<typeof ChannelCapabilityTypeSchema>;
5193
5236
  export type ChannelCapability = z.infer<typeof ChannelCapabilitySchema>;
package/dist/server.js CHANGED
@@ -1072,8 +1072,8 @@ async function handleInstall(body, hooks) {
1072
1072
  try {
1073
1073
  const installHook = hooks.install;
1074
1074
  const installHandler = typeof installHook === "function" ? installHook : installHook.handler;
1075
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1076
- return await runWithConfig(requestConfig, async () => {
1075
+ const result = await runWithConfig(requestConfig, async () => {
1076
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1077
1077
  return await installHandler(installContext);
1078
1078
  });
1079
1079
  });
@@ -1140,8 +1140,8 @@ async function handleUninstall(body, hooks) {
1140
1140
  try {
1141
1141
  const uninstallHook = hooks.uninstall;
1142
1142
  const uninstallHandlerFn = typeof uninstallHook === "function" ? uninstallHook : uninstallHook.handler;
1143
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1144
- return await runWithConfig(requestConfig, async () => {
1143
+ const result = await runWithConfig(requestConfig, async () => {
1144
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1145
1145
  return await uninstallHandlerFn(uninstallContext);
1146
1146
  });
1147
1147
  });
@@ -1201,8 +1201,8 @@ async function handleProvision(body, hooks) {
1201
1201
  try {
1202
1202
  const provisionHook = hooks.provision;
1203
1203
  const provisionHandler = typeof provisionHook === "function" ? provisionHook : provisionHook.handler;
1204
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1205
- return await runWithConfig(requestConfig, async () => {
1204
+ const result = await runWithConfig(requestConfig, async () => {
1205
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1206
1206
  return await provisionHandler(provisionContext);
1207
1207
  });
1208
1208
  });
@@ -1261,14 +1261,11 @@ async function handleSetupRevalidate(body, hooks) {
1261
1261
  };
1262
1262
  try {
1263
1263
  const handler = typeof revalidateHook === "function" ? revalidateHook : revalidateHook.handler;
1264
- const result = await runWithLogContext(
1265
- { invocation: body.invocation },
1266
- async () => {
1267
- return await runWithConfig(requestConfig, async () => {
1268
- return await handler(ctx);
1269
- });
1270
- }
1271
- );
1264
+ const result = await runWithConfig(requestConfig, async () => {
1265
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1266
+ return await handler(ctx);
1267
+ });
1268
+ });
1272
1269
  return {
1273
1270
  status: 200,
1274
1271
  body: {
@@ -1366,8 +1363,8 @@ async function handleOAuthCallback(parsedBody, hooks) {
1366
1363
  try {
1367
1364
  const oauthCallbackHook = hooks.oauth_callback;
1368
1365
  const oauthCallbackHandler = typeof oauthCallbackHook === "function" ? oauthCallbackHook : oauthCallbackHook.handler;
1369
- const result = await runWithLogContext({ invocation }, async () => {
1370
- return await runWithConfig(requestConfig, async () => {
1366
+ const result = await runWithConfig(requestConfig, async () => {
1367
+ return await runWithLogContext({ invocation }, async () => {
1371
1368
  return await oauthCallbackHandler(oauthCallbackContext);
1372
1369
  });
1373
1370
  });
@@ -1487,8 +1484,8 @@ async function executeWebhookHandler(handle, webhookRegistry, data) {
1487
1484
  invocation: data.invocation,
1488
1485
  isProvisionContext: !isRuntimeWebhookContext(data.webhookContext)
1489
1486
  };
1490
- webhookResponse = await runWithLogContext({ invocation: data.invocation }, async () => {
1491
- return await runWithConfig(requestConfig, async () => {
1487
+ webhookResponse = await runWithConfig(requestConfig, async () => {
1488
+ return await runWithLogContext({ invocation: data.invocation }, async () => {
1492
1489
  return await runWithRateLimitExecutionContext(rateLimitContext, async () => {
1493
1490
  return await webhookDef.handler(data.webhookRequest, data.webhookContext);
1494
1491
  });
@@ -1033,8 +1033,8 @@ async function handleInstall(body, hooks) {
1033
1033
  try {
1034
1034
  const installHook = hooks.install;
1035
1035
  const installHandler = typeof installHook === "function" ? installHook : installHook.handler;
1036
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1037
- return await runWithConfig(requestConfig, async () => {
1036
+ const result = await runWithConfig(requestConfig, async () => {
1037
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1038
1038
  return await installHandler(installContext);
1039
1039
  });
1040
1040
  });
@@ -1101,8 +1101,8 @@ async function handleUninstall(body, hooks) {
1101
1101
  try {
1102
1102
  const uninstallHook = hooks.uninstall;
1103
1103
  const uninstallHandlerFn = typeof uninstallHook === "function" ? uninstallHook : uninstallHook.handler;
1104
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1105
- return await runWithConfig(requestConfig, async () => {
1104
+ const result = await runWithConfig(requestConfig, async () => {
1105
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1106
1106
  return await uninstallHandlerFn(uninstallContext);
1107
1107
  });
1108
1108
  });
@@ -1162,8 +1162,8 @@ async function handleProvision(body, hooks) {
1162
1162
  try {
1163
1163
  const provisionHook = hooks.provision;
1164
1164
  const provisionHandler = typeof provisionHook === "function" ? provisionHook : provisionHook.handler;
1165
- const result = await runWithLogContext({ invocation: body.invocation }, async () => {
1166
- return await runWithConfig(requestConfig, async () => {
1165
+ const result = await runWithConfig(requestConfig, async () => {
1166
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1167
1167
  return await provisionHandler(provisionContext);
1168
1168
  });
1169
1169
  });
@@ -1222,14 +1222,11 @@ async function handleSetupRevalidate(body, hooks) {
1222
1222
  };
1223
1223
  try {
1224
1224
  const handler = typeof revalidateHook === "function" ? revalidateHook : revalidateHook.handler;
1225
- const result = await runWithLogContext(
1226
- { invocation: body.invocation },
1227
- async () => {
1228
- return await runWithConfig(requestConfig, async () => {
1229
- return await handler(ctx);
1230
- });
1231
- }
1232
- );
1225
+ const result = await runWithConfig(requestConfig, async () => {
1226
+ return await runWithLogContext({ invocation: body.invocation }, async () => {
1227
+ return await handler(ctx);
1228
+ });
1229
+ });
1233
1230
  return {
1234
1231
  status: 200,
1235
1232
  body: {
@@ -1327,8 +1324,8 @@ async function handleOAuthCallback(parsedBody, hooks) {
1327
1324
  try {
1328
1325
  const oauthCallbackHook = hooks.oauth_callback;
1329
1326
  const oauthCallbackHandler = typeof oauthCallbackHook === "function" ? oauthCallbackHook : oauthCallbackHook.handler;
1330
- const result = await runWithLogContext({ invocation }, async () => {
1331
- return await runWithConfig(requestConfig, async () => {
1327
+ const result = await runWithConfig(requestConfig, async () => {
1328
+ return await runWithLogContext({ invocation }, async () => {
1332
1329
  return await oauthCallbackHandler(oauthCallbackContext);
1333
1330
  });
1334
1331
  });
@@ -1448,8 +1445,8 @@ async function executeWebhookHandler(handle, webhookRegistry, data) {
1448
1445
  invocation: data.invocation,
1449
1446
  isProvisionContext: !isRuntimeWebhookContext(data.webhookContext)
1450
1447
  };
1451
- webhookResponse = await runWithLogContext({ invocation: data.invocation }, async () => {
1452
- return await runWithConfig(requestConfig, async () => {
1448
+ webhookResponse = await runWithConfig(requestConfig, async () => {
1449
+ return await runWithLogContext({ invocation: data.invocation }, async () => {
1453
1450
  return await runWithRateLimitExecutionContext(rateLimitContext, async () => {
1454
1451
  return await webhookDef.handler(data.webhookRequest, data.webhookContext);
1455
1452
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.7.16",
3
+ "version": "1.7.19",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",