@epilot/app-client 0.10.0 → 0.10.1

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/openapi.d.ts CHANGED
@@ -821,7 +821,7 @@ declare namespace Components {
821
821
  flow_action_config?: AppBridgeSurfaceConfig;
822
822
  };
823
823
  }
824
- export type CustomFlowConfig = ExternalIntegrationCustomActionConfig | SandboxCustomActionConfig;
824
+ export type CustomFlowConfig = ExternalIntegrationCustomActionConfig;
825
825
  export interface EnumArg {
826
826
  type?: "enum";
827
827
  /**
@@ -1246,12 +1246,17 @@ declare namespace Components {
1246
1246
  *
1247
1247
  */
1248
1248
  PortalExtensionHookRegistrationIdentifiersCheck | /**
1249
- * Hook that replaces the built-in contract identification for self-assignment. This hook makes a POST call whenever a user is trying to self-assign a contract to find the corresponding contract(s). The expected response to the call is:
1250
- * - 200 if found with either:
1251
- * - contract_id array
1252
- * - contact_id string
1253
- * - 404 if no contract is found
1254
- * If `contact_id` is provided in the response, Contracts are retrieved from this Contact. In that case, optionally, if you also specify `contact_relation_attribute`, the specified Contact attribute of the user performing the action will be modified to add the matched Contact.
1249
+ * Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).
1250
+ * The expected response http status code to the call is:
1251
+ * - 200 if found
1252
+ * - 404 if not found
1253
+ *
1254
+ * The following assignment modes are supported:
1255
+ * - `contracts`: We expect the response to contain Contract ids (customizable using `result` property).
1256
+ * - `contact_to_contracts`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact as a Customer to the Contracts and (optionally) update the Contact attribute specified by `contact_relation_attribute` to add the matched Contact.
1257
+ * - `contact_to_portal_user`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact to the Portal User. Portal User will be able to see all data including Contracts transitively.
1258
+ *
1259
+ * Defaults to `contact_to_contracts` for backwards compatibility. We recommend using `contact_to_portal_user` as it does not influence the data model of business entities.
1255
1260
  *
1256
1261
  */
1257
1262
  PortalExtensionHookContractIdentification | /**
@@ -1367,12 +1372,17 @@ declare namespace Components {
1367
1372
  use_static_ips?: boolean;
1368
1373
  }
1369
1374
  /**
1370
- * Hook that replaces the built-in contract identification for self-assignment. This hook makes a POST call whenever a user is trying to self-assign a contract to find the corresponding contract(s). The expected response to the call is:
1371
- * - 200 if found with either:
1372
- * - contract_id array
1373
- * - contact_id string
1374
- * - 404 if no contract is found
1375
- * If `contact_id` is provided in the response, Contracts are retrieved from this Contact. In that case, optionally, if you also specify `contact_relation_attribute`, the specified Contact attribute of the user performing the action will be modified to add the matched Contact.
1375
+ * Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).
1376
+ * The expected response http status code to the call is:
1377
+ * - 200 if found
1378
+ * - 404 if not found
1379
+ *
1380
+ * The following assignment modes are supported:
1381
+ * - `contracts`: We expect the response to contain Contract ids (customizable using `result` property).
1382
+ * - `contact_to_contracts`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact as a Customer to the Contracts and (optionally) update the Contact attribute specified by `contact_relation_attribute` to add the matched Contact.
1383
+ * - `contact_to_portal_user`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact to the Portal User. Portal User will be able to see all data including Contracts transitively.
1384
+ *
1385
+ * Defaults to `contact_to_contracts` for backwards compatibility. We recommend using `contact_to_portal_user` as it does not influence the data model of business entities.
1376
1386
  *
1377
1387
  */
1378
1388
  export interface PortalExtensionHookContractIdentification {
@@ -1407,7 +1417,11 @@ declare namespace Components {
1407
1417
  };
1408
1418
  };
1409
1419
  /**
1410
- * Name of the Contact attribute to update with the matched Contact ID. Must be a Contact relation attribute supporting multiple entities.
1420
+ * Mode of contract assignment. See hook description for mode details.
1421
+ */
1422
+ assignment_mode?: "contracts" | "contact_to_contracts" | "contact_to_portal_user";
1423
+ /**
1424
+ * Name of the Contact attribute to update with the matched Contact ID when using `contact_to_contracts` mode. Must be a Contact relation attribute supporting multiple entities.
1411
1425
  * example:
1412
1426
  * represents_contact
1413
1427
  */
@@ -1420,7 +1434,7 @@ declare namespace Components {
1420
1434
  /**
1421
1435
  * Explanation of the functionality shown to the end user.
1422
1436
  * example:
1423
- * This process will give you access to all Contracts kept
1437
+ * This process will give you access to the matching Contracts.
1424
1438
  */
1425
1439
  en: string;
1426
1440
  };
@@ -1807,28 +1821,6 @@ declare namespace Components {
1807
1821
  */
1808
1822
  key: string;
1809
1823
  }
1810
- export interface SandboxCustomActionConfig {
1811
- /**
1812
- * Name of the custom action
1813
- */
1814
- name?: string;
1815
- /**
1816
- * Description of the custom action
1817
- */
1818
- description?: string;
1819
- /**
1820
- * Wait for callback_url to be called before completing the action
1821
- */
1822
- wait_for_callback?: boolean;
1823
- type: "sandbox";
1824
- sandbox_settings?: {
1825
- /**
1826
- * JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.
1827
- *
1828
- */
1829
- code?: string;
1830
- };
1831
- }
1832
1824
  export interface TextArg {
1833
1825
  type?: "text";
1834
1826
  }
@@ -3070,6 +3062,5 @@ export type RawEvents = Components.Schemas.RawEvents;
3070
3062
  export type Review = Components.Schemas.Review;
3071
3063
  export type Role = Components.Schemas.Role;
3072
3064
  export type S3Reference = Components.Schemas.S3Reference;
3073
- export type SandboxCustomActionConfig = Components.Schemas.SandboxCustomActionConfig;
3074
3065
  export type TextArg = Components.Schemas.TextArg;
3075
3066
  export type TranslatedString = Components.Schemas.TranslatedString;
package/dist/openapi.json CHANGED
@@ -2070,52 +2070,17 @@
2070
2070
  }
2071
2071
  ]
2072
2072
  },
2073
- "SandboxCustomActionConfig": {
2074
- "allOf": [
2075
- {
2076
- "$ref": "#/components/schemas/BaseCustomActionConfig"
2077
- },
2078
- {
2079
- "type": "object",
2080
- "properties": {
2081
- "type": {
2082
- "type": "string",
2083
- "enum": [
2084
- "sandbox"
2085
- ]
2086
- },
2087
- "sandbox_settings": {
2088
- "type": "object",
2089
- "properties": {
2090
- "code": {
2091
- "type": "string",
2092
- "description": "JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.\n",
2093
- "maxLength": 307200
2094
- }
2095
- }
2096
- }
2097
- },
2098
- "required": [
2099
- "type"
2100
- ]
2101
- }
2102
- ]
2103
- },
2104
2073
  "CustomFlowConfig": {
2105
2074
  "type": "object",
2106
2075
  "oneOf": [
2107
2076
  {
2108
2077
  "$ref": "#/components/schemas/ExternalIntegrationCustomActionConfig"
2109
- },
2110
- {
2111
- "$ref": "#/components/schemas/SandboxCustomActionConfig"
2112
2078
  }
2113
2079
  ],
2114
2080
  "discriminator": {
2115
2081
  "propertyName": "type",
2116
2082
  "mapping": {
2117
- "external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig",
2118
- "sandbox": "#/components/schemas/SandboxCustomActionConfig"
2083
+ "external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig"
2119
2084
  }
2120
2085
  }
2121
2086
  },
@@ -2273,7 +2238,7 @@
2273
2238
  "additionalProperties": false
2274
2239
  },
2275
2240
  "PortalExtensionHookContractIdentification": {
2276
- "description": "Hook that replaces the built-in contract identification for self-assignment. This hook makes a POST call whenever a user is trying to self-assign a contract to find the corresponding contract(s). The expected response to the call is:\n - 200 if found with either:\n - contract_id array\n - contact_id string\n - 404 if no contract is found\nIf `contact_id` is provided in the response, Contracts are retrieved from this Contact. In that case, optionally, if you also specify `contact_relation_attribute`, the specified Contact attribute of the user performing the action will be modified to add the matched Contact.\n",
2241
+ "description": "Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).\nThe expected response http status code to the call is:\n - 200 if found\n - 404 if not found\n\nThe following assignment modes are supported:\n - `contracts`: We expect the response to contain Contract ids (customizable using `result` property).\n - `contact_to_contracts`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact as a Customer to the Contracts and (optionally) update the Contact attribute specified by `contact_relation_attribute` to add the matched Contact.\n - `contact_to_portal_user`: We expect the response to contain a Contact id (customizable using `result` property) and we will assign the Contact to the Portal User. Portal User will be able to see all data including Contracts transitively.\n\nDefaults to `contact_to_contracts` for backwards compatibility. We recommend using `contact_to_portal_user` as it does not influence the data model of business entities.\n",
2277
2242
  "type": "object",
2278
2243
  "properties": {
2279
2244
  "type": {
@@ -2324,9 +2289,19 @@
2324
2289
  ],
2325
2290
  "additionalProperties": false
2326
2291
  },
2292
+ "assignment_mode": {
2293
+ "type": "string",
2294
+ "enum": [
2295
+ "contracts",
2296
+ "contact_to_contracts",
2297
+ "contact_to_portal_user"
2298
+ ],
2299
+ "description": "Mode of contract assignment. See hook description for mode details.",
2300
+ "default": "contact_to_contracts"
2301
+ },
2327
2302
  "contact_relation_attribute": {
2328
2303
  "type": "string",
2329
- "description": "Name of the Contact attribute to update with the matched Contact ID. Must be a Contact relation attribute supporting multiple entities.",
2304
+ "description": "Name of the Contact attribute to update with the matched Contact ID when using `contact_to_contracts` mode. Must be a Contact relation attribute supporting multiple entities.",
2330
2305
  "example": "represents_contact"
2331
2306
  },
2332
2307
  "explanation": {
@@ -2335,7 +2310,7 @@
2335
2310
  "en": {
2336
2311
  "type": "string",
2337
2312
  "description": "Explanation of the functionality shown to the end user.",
2338
- "example": "This process will give you access to all Contracts kept"
2313
+ "example": "This process will give you access to the matching Contracts."
2339
2314
  }
2340
2315
  },
2341
2316
  "additionalProperties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",