@epilot/sdk 2.1.2 → 2.1.4

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 (124) hide show
  1. package/definitions/customer-portal.json +216 -19
  2. package/definitions/email-settings-runtime.json +1 -1
  3. package/definitions/email-settings.json +121 -0
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.js +1 -1
  14. package/dist/apis/audit-logs.cjs +6 -6
  15. package/dist/apis/audit-logs.js +1 -1
  16. package/dist/apis/automation.cjs +6 -6
  17. package/dist/apis/automation.js +1 -1
  18. package/dist/apis/billing.cjs +6 -6
  19. package/dist/apis/billing.js +1 -1
  20. package/dist/apis/blueprint-manifest.cjs +6 -6
  21. package/dist/apis/blueprint-manifest.js +1 -1
  22. package/dist/apis/consent.cjs +6 -6
  23. package/dist/apis/consent.js +1 -1
  24. package/dist/apis/customer-portal.cjs +6 -6
  25. package/dist/apis/customer-portal.d.cts +2 -2
  26. package/dist/apis/customer-portal.d.ts +2 -2
  27. package/dist/apis/customer-portal.js +1 -1
  28. package/dist/apis/dashboard.cjs +6 -6
  29. package/dist/apis/dashboard.js +1 -1
  30. package/dist/apis/data-management.cjs +6 -6
  31. package/dist/apis/data-management.js +1 -1
  32. package/dist/apis/deduplication.cjs +6 -6
  33. package/dist/apis/deduplication.js +1 -1
  34. package/dist/apis/design.cjs +6 -6
  35. package/dist/apis/design.js +1 -1
  36. package/dist/apis/document.cjs +6 -6
  37. package/dist/apis/document.js +1 -1
  38. package/dist/apis/email-settings.cjs +8 -8
  39. package/dist/apis/email-settings.d.cts +2 -2
  40. package/dist/apis/email-settings.d.ts +2 -2
  41. package/dist/apis/email-settings.js +2 -2
  42. package/dist/apis/email-template.cjs +6 -6
  43. package/dist/apis/email-template.js +1 -1
  44. package/dist/apis/entity-mapping.cjs +6 -6
  45. package/dist/apis/entity-mapping.js +1 -1
  46. package/dist/apis/entity.cjs +6 -6
  47. package/dist/apis/entity.js +1 -1
  48. package/dist/apis/environments.cjs +6 -6
  49. package/dist/apis/environments.js +1 -1
  50. package/dist/apis/erp-integration.cjs +6 -6
  51. package/dist/apis/erp-integration.js +1 -1
  52. package/dist/apis/event-catalog.cjs +6 -6
  53. package/dist/apis/event-catalog.js +1 -1
  54. package/dist/apis/file.cjs +6 -6
  55. package/dist/apis/file.js +1 -1
  56. package/dist/apis/iban.cjs +6 -6
  57. package/dist/apis/iban.js +1 -1
  58. package/dist/apis/journey.cjs +6 -6
  59. package/dist/apis/journey.js +1 -1
  60. package/dist/apis/kanban.cjs +6 -6
  61. package/dist/apis/kanban.js +1 -1
  62. package/dist/apis/message.cjs +6 -6
  63. package/dist/apis/message.js +1 -1
  64. package/dist/apis/metering.cjs +6 -6
  65. package/dist/apis/metering.js +1 -1
  66. package/dist/apis/notes.cjs +6 -6
  67. package/dist/apis/notes.js +1 -1
  68. package/dist/apis/notification.cjs +6 -6
  69. package/dist/apis/notification.js +1 -1
  70. package/dist/apis/organization.cjs +6 -6
  71. package/dist/apis/organization.js +1 -1
  72. package/dist/apis/partner-directory.cjs +6 -6
  73. package/dist/apis/partner-directory.js +1 -1
  74. package/dist/apis/permissions.cjs +6 -6
  75. package/dist/apis/permissions.js +1 -1
  76. package/dist/apis/pricing-tier.cjs +6 -6
  77. package/dist/apis/pricing-tier.js +1 -1
  78. package/dist/apis/pricing.cjs +6 -6
  79. package/dist/apis/pricing.js +1 -1
  80. package/dist/apis/purpose.cjs +6 -6
  81. package/dist/apis/purpose.js +1 -1
  82. package/dist/apis/sandbox.cjs +6 -6
  83. package/dist/apis/sandbox.js +1 -1
  84. package/dist/apis/submission.cjs +6 -6
  85. package/dist/apis/submission.js +1 -1
  86. package/dist/apis/targeting.cjs +6 -6
  87. package/dist/apis/targeting.js +1 -1
  88. package/dist/apis/template-variables.cjs +6 -6
  89. package/dist/apis/template-variables.js +1 -1
  90. package/dist/apis/user.cjs +6 -6
  91. package/dist/apis/user.js +1 -1
  92. package/dist/apis/validation-rules.cjs +6 -6
  93. package/dist/apis/validation-rules.js +1 -1
  94. package/dist/apis/webhooks.cjs +6 -6
  95. package/dist/apis/webhooks.js +1 -1
  96. package/dist/apis/workflow-definition.cjs +6 -6
  97. package/dist/apis/workflow-definition.js +1 -1
  98. package/dist/apis/workflow.cjs +6 -6
  99. package/dist/apis/workflow.js +1 -1
  100. package/dist/{chunk-RJ3DWFSK.js → chunk-3NLMZLCD.js} +1 -1
  101. package/dist/{chunk-T7LQKRUK.cjs → chunk-5HXHGSD5.cjs} +3 -3
  102. package/dist/{chunk-BPHOGIQM.cjs → chunk-A67W5WAP.cjs} +1 -1
  103. package/dist/{chunk-QTU4H6NQ.js → chunk-YW6UBO24.js} +3 -3
  104. package/dist/customer-portal-5JVN4Y5Y.js +7 -0
  105. package/dist/customer-portal-T7KIY3AE.cjs +7 -0
  106. package/dist/{customer-portal.d-Bh9NF8cY.d.cts → customer-portal.d-uN6lOpvy.d.cts} +174 -32
  107. package/dist/{customer-portal.d-Bh9NF8cY.d.ts → customer-portal.d-uN6lOpvy.d.ts} +174 -32
  108. package/dist/email-settings-EJ3DCPPN.js +7 -0
  109. package/dist/email-settings-TALOPLBC.cjs +7 -0
  110. package/dist/{email-settings-runtime-NS7MU3RB.cjs → email-settings-runtime-3NJIAWWI.cjs} +2 -2
  111. package/dist/{email-settings-runtime-X7F3EPAB.js → email-settings-runtime-Q2HVKJDS.js} +1 -1
  112. package/dist/{email-settings.d-BXxYjVDr.d.cts → email-settings.d-DUvmLZMN.d.cts} +115 -2
  113. package/dist/{email-settings.d-BXxYjVDr.d.ts → email-settings.d-DUvmLZMN.d.ts} +115 -2
  114. package/dist/index.cjs +10 -10
  115. package/dist/index.d.cts +2 -2
  116. package/dist/index.d.ts +2 -2
  117. package/dist/index.js +2 -2
  118. package/docs/customer-portal.md +351 -1123
  119. package/docs/email-settings.md +80 -1
  120. package/package.json +1 -1
  121. package/dist/customer-portal-D3SLPAHZ.js +0 -7
  122. package/dist/customer-portal-UR3GN4VU.cjs +0 -7
  123. package/dist/email-settings-TQ5GGDYG.js +0 -7
  124. package/dist/email-settings-TQC34GST.cjs +0 -7
@@ -39,8 +39,6 @@ const { data } = await customerPortalClient.upsertPortal(...)
39
39
  - [`getEmailTemplates`](#getemailtemplates)
40
40
  - [`upsertEmailTemplatesByPortalId`](#upsertemailtemplatesbyportalid)
41
41
  - [`getEmailTemplatesByPortalId`](#getemailtemplatesbyportalid)
42
- - [`upsertPortalWidget`](#upsertportalwidget)
43
- - [`getPortalWidgets`](#getportalwidgets)
44
42
  - [`replaceECPTemplateVariables`](#replaceecptemplatevariables)
45
43
  - [`extraPermissionAttributes`](#extrapermissionattributes)
46
44
  - [`validateCaaRecords`](#validatecaarecords)
@@ -80,7 +78,6 @@ const { data } = await customerPortalClient.upsertPortal(...)
80
78
  - [`getPublicPortalExtensionDetailsV3`](#getpublicportalextensiondetailsv3)
81
79
  - [`getPublicPortalConfig`](#getpublicportalconfig)
82
80
  - [`getPublicPortalConfigV3`](#getpublicportalconfigv3)
83
- - [`getPublicPortalWidgets`](#getpublicportalwidgets)
84
81
  - [`getSchemasByDomain`](#getschemasbydomain)
85
82
  - [`getOrganizationSettingsByDomain`](#getorganizationsettingsbydomain)
86
83
  - [`checkContactExists`](#checkcontactexists)
@@ -105,31 +102,17 @@ const { data } = await customerPortalClient.upsertPortal(...)
105
102
  - [`getResolvedSeamlessLink`](#getresolvedseamlesslink)
106
103
  - [`getSchemas`](#getschemas)
107
104
  - [`getContact`](#getcontact)
108
- - [`updateContact`](#updatecontact)
109
105
  - [`getPortalUser`](#getportaluser)
110
106
  - [`updatePortalUser`](#updateportaluser)
111
107
  - [`deletePortalUser`](#deleteportaluser)
112
108
  - [`updatePortalUserEmail`](#updateportaluseremail)
113
- - [`getAllOrders`](#getallorders)
114
109
  - [`postOrderAcceptance`](#postorderacceptance)
115
- - [`getOrder`](#getorder)
116
- - [`updateOrder`](#updateorder)
117
- - [`getAllOpportunities`](#getallopportunities)
118
- - [`getSearchableAttributesForOpportunities`](#getsearchableattributesforopportunities)
119
- - [`getSearchResultsForOpportunities`](#getsearchresultsforopportunities)
120
- - [`getOpportunity`](#getopportunity)
121
- - [`updateOpportunity`](#updateopportunity)
122
- - [`getAllRequests`](#getallrequests)
123
- - [`getAllContracts`](#getallcontracts)
124
- - [`getContract`](#getcontract)
125
- - [`updateContract`](#updatecontract)
126
110
  - [`addContractByIdentifiers`](#addcontractbyidentifiers)
127
111
  - [`validateCadenceEntityEditRules`](#validatecadenceentityeditrules)
128
112
  - [`searchPaymentRelationsInEntities`](#searchpaymentrelationsinentities)
129
113
  - [`createCustomEntityActivity`](#createcustomentityactivity)
130
114
  - [`saveEntityFile`](#saveentityfile)
131
115
  - [`deleteEntityFile`](#deleteentityfile)
132
- - [`getFileById`](#getfilebyid)
133
116
  - [`trackFileDownloaded`](#trackfiledownloaded)
134
117
  - [`getBillingEvents`](#getbillingevents)
135
118
  - [`triggerEntityAccessEvent`](#triggerentityaccessevent)
@@ -272,6 +255,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
272
255
  - [`ExtensionHookPriceDataRetrieval`](#extensionhookpricedataretrieval)
273
256
  - [`ExtensionHookConsumptionDataRetrieval`](#extensionhookconsumptiondataretrieval)
274
257
  - [`ExtensionHookCostDataRetrieval`](#extensionhookcostdataretrieval)
258
+ - [`SecureProxyConfig`](#secureproxyconfig)
275
259
  - [`ExtensionAuthBlock`](#extensionauthblock)
276
260
  - [`Direction`](#direction)
277
261
  - [`TariffType`](#tarifftype)
@@ -1315,7 +1299,11 @@ const { data } = await client.getPortalExtensions({
1315
1299
  "body": {},
1316
1300
  "result": "string"
1317
1301
  },
1318
- "use_static_ips": false
1302
+ "use_static_ips": false,
1303
+ "secure_proxy": {
1304
+ "integration_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1305
+ "use_case_slug": "string"
1306
+ }
1319
1307
  }
1320
1308
  ]
1321
1309
  }
@@ -1518,7 +1506,11 @@ const { data } = await client.getPortalExtensionsV3({
1518
1506
  "body": {},
1519
1507
  "result": "string"
1520
1508
  },
1521
- "use_static_ips": false
1509
+ "use_static_ips": false,
1510
+ "secure_proxy": {
1511
+ "integration_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1512
+ "use_case_slug": "string"
1513
+ }
1522
1514
  }
1523
1515
  ]
1524
1516
  }
@@ -2947,205 +2939,6 @@ const { data } = await client.getEmailTemplatesByPortalId({
2947
2939
 
2948
2940
  ---
2949
2941
 
2950
- ### `getPublicPortalWidgets`
2951
-
2952
- Retrieves the public widgets of a portal
2953
-
2954
- `GET /v2/portal/public-widgets`
2955
-
2956
- ```ts
2957
- const { data } = await client.getPublicPortalWidgets({
2958
- org_id: 'example',
2959
- origin: 'example',
2960
- })
2961
- ```
2962
-
2963
- <details>
2964
- <summary>Response</summary>
2965
-
2966
- ```json
2967
- {
2968
- "widgets": [
2969
- {
2970
- "id": "string",
2971
- "type": "ACTION_WIDGET",
2972
- "listIndex": 0,
2973
- "headline": {
2974
- "en": "string",
2975
- "de": "string"
2976
- },
2977
- "subHeadline": {
2978
- "en": "string",
2979
- "de": "string"
2980
- },
2981
- "schema": "string"
2982
- },
2983
- {
2984
- "id": "string",
2985
- "type": "ACTION_WIDGET",
2986
- "listIndex": 0,
2987
- "headline": {
2988
- "en": "string",
2989
- "de": "string"
2990
- },
2991
- "subHeadline": {
2992
- "en": "string",
2993
- "de": "string"
2994
- },
2995
- "content": "string"
2996
- }
2997
- ]
2998
- }
2999
- ```
3000
-
3001
- </details>
3002
-
3003
- ---
3004
-
3005
- ### `upsertPortalWidget`
3006
-
3007
- Upsert widget for a portal of an organization.
3008
-
3009
- `POST /v2/portal/widgets`
3010
-
3011
- ```ts
3012
- const { data } = await client.upsertPortalWidget(
3013
- {
3014
- origin: 'example',
3015
- },
3016
- {
3017
- widgets: [
3018
- {
3019
- id: 'string',
3020
- type: 'ACTION_WIDGET',
3021
- listIndex: 0,
3022
- headline: {
3023
- en: 'string',
3024
- de: 'string'
3025
- },
3026
- subHeadline: {
3027
- en: 'string',
3028
- de: 'string'
3029
- },
3030
- schema: 'string'
3031
- },
3032
- {
3033
- id: 'string',
3034
- type: 'ACTION_WIDGET',
3035
- listIndex: 0,
3036
- headline: {
3037
- en: 'string',
3038
- de: 'string'
3039
- },
3040
- subHeadline: {
3041
- en: 'string',
3042
- de: 'string'
3043
- },
3044
- content: 'string'
3045
- },
3046
- /* ... 8 more */
3047
- ]
3048
- },
3049
- )
3050
- ```
3051
-
3052
- <details>
3053
- <summary>Response</summary>
3054
-
3055
- ```json
3056
- {
3057
- "widgets": [
3058
- {
3059
- "id": "string",
3060
- "type": "ACTION_WIDGET",
3061
- "listIndex": 0,
3062
- "headline": {
3063
- "en": "string",
3064
- "de": "string"
3065
- },
3066
- "subHeadline": {
3067
- "en": "string",
3068
- "de": "string"
3069
- },
3070
- "schema": "string"
3071
- },
3072
- {
3073
- "id": "string",
3074
- "type": "ACTION_WIDGET",
3075
- "listIndex": 0,
3076
- "headline": {
3077
- "en": "string",
3078
- "de": "string"
3079
- },
3080
- "subHeadline": {
3081
- "en": "string",
3082
- "de": "string"
3083
- },
3084
- "content": "string"
3085
- }
3086
- ]
3087
- }
3088
- ```
3089
-
3090
- </details>
3091
-
3092
- ---
3093
-
3094
- ### `getPortalWidgets`
3095
-
3096
- Retrieves the widgets of a portal
3097
-
3098
- `GET /v2/portal/widgets`
3099
-
3100
- ```ts
3101
- const { data } = await client.getPortalWidgets({
3102
- origin: 'example',
3103
- contract_id: 'example',
3104
- })
3105
- ```
3106
-
3107
- <details>
3108
- <summary>Response</summary>
3109
-
3110
- ```json
3111
- {
3112
- "widgets": [
3113
- {
3114
- "id": "string",
3115
- "type": "ACTION_WIDGET",
3116
- "listIndex": 0,
3117
- "headline": {
3118
- "en": "string",
3119
- "de": "string"
3120
- },
3121
- "subHeadline": {
3122
- "en": "string",
3123
- "de": "string"
3124
- },
3125
- "schema": "string"
3126
- },
3127
- {
3128
- "id": "string",
3129
- "type": "ACTION_WIDGET",
3130
- "listIndex": 0,
3131
- "headline": {
3132
- "en": "string",
3133
- "de": "string"
3134
- },
3135
- "subHeadline": {
3136
- "en": "string",
3137
- "de": "string"
3138
- },
3139
- "content": "string"
3140
- }
3141
- ]
3142
- }
3143
- ```
3144
-
3145
- </details>
3146
-
3147
- ---
3148
-
3149
2942
  ### `replaceECPTemplateVariables`
3150
2943
 
3151
2944
  Replaces the template variables of a portal
@@ -3530,40 +3323,6 @@ const { data } = await client.getContact()
3530
3323
 
3531
3324
  ---
3532
3325
 
3533
- ### `updateContact`
3534
-
3535
- Updates the contact details.
3536
-
3537
- `PATCH /v2/portal/contact`
3538
-
3539
- ```ts
3540
- const { data } = await client.updateContact(
3541
- null,
3542
- {},
3543
- )
3544
- ```
3545
-
3546
- <details>
3547
- <summary>Response</summary>
3548
-
3549
- ```json
3550
- {
3551
- "data": {
3552
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
3553
- "_title": "Example Entity",
3554
- "_org": "123",
3555
- "_tags": ["example", "mock"],
3556
- "_created_at": "2021-02-09T12:41:43.662Z",
3557
- "_updated_at": "2021-02-09T12:41:43.662Z",
3558
- "_schema": "contact"
3559
- }
3560
- }
3561
- ```
3562
-
3563
- </details>
3564
-
3565
- ---
3566
-
3567
3326
  ### `getECPContact`
3568
3327
 
3569
3328
  Get the Contact by id
@@ -3921,588 +3680,30 @@ const { data } = await client.confirmUserWithUserId({
3921
3680
  id: '123e4567-e89b-12d3-a456-426614174000',
3922
3681
  org_id: 'example',
3923
3682
  })
3924
- ```
3925
-
3926
- ---
3927
-
3928
- ### `userExists`
3929
-
3930
- Checks whether a user exists in the portal
3931
-
3932
- `GET /v2/portal/public/user/exists`
3933
-
3934
- ```ts
3935
- const { data } = await client.userExists({
3936
- email: 'example',
3937
- org_id: 'example',
3938
- origin: 'example',
3939
- })
3940
- ```
3941
-
3942
- <details>
3943
- <summary>Response</summary>
3944
-
3945
- ```json
3946
- {
3947
- "exists": true
3948
- }
3949
- ```
3950
-
3951
- </details>
3952
-
3953
- ---
3954
-
3955
- ### `userExistsV3`
3956
-
3957
- Checks whether a user exists in the portal
3958
-
3959
- `GET /v3/portal/public/user/exists`
3960
-
3961
- ```ts
3962
- const { data } = await client.userExistsV3({
3963
- email: 'example',
3964
- org_id: 'example',
3965
- portal_id: 'example',
3966
- })
3967
- ```
3968
-
3969
- <details>
3970
- <summary>Response</summary>
3971
-
3972
- ```json
3973
- {
3974
- "exists": true
3975
- }
3976
- ```
3977
-
3978
- </details>
3979
-
3980
- ---
3981
-
3982
- ### `getRecipientsToNotifyOnAutomation`
3983
-
3984
- Get recipients to notify on automation
3985
-
3986
- `POST /v2/portal/recipients-to-notify`
3987
-
3988
- ```ts
3989
- const { data } = await client.getRecipientsToNotifyOnAutomation(
3990
- null,
3991
- {
3992
- emails: ['john@doe.com'],
3993
- template_id: '5da0a718-c822-403d-9f5d-20d4584e0528',
3994
- context_id: '5da0a718-c822-403d-9f5d-20d4584e0528'
3995
- },
3996
- )
3997
- ```
3998
-
3999
- <details>
4000
- <summary>Response</summary>
4001
-
4002
- ```json
4003
- {
4004
- "recipients": [
4005
- {
4006
- "email": "john@doe.com",
4007
- "recipient_id": "5da0a718-c822-403d-9f5d-20d4584e0528"
4008
- }
4009
- ],
4010
- "message": "string"
4011
- }
4012
- ```
4013
-
4014
- </details>
4015
-
4016
- ---
4017
-
4018
- ### `configureDistribution`
4019
-
4020
- Configure the distribution for the portal's custom domain
4021
-
4022
- `GET /v2/portal/configure-distribution`
4023
-
4024
- ```ts
4025
- const { data } = await client.configureDistribution({
4026
- origin: 'example',
4027
- })
4028
- ```
4029
-
4030
- <details>
4031
- <summary>Response</summary>
4032
-
4033
- ```json
4034
- {
4035
- "domainName": "dsj8op4ha01jha23.cloudfront.net"
4036
- }
4037
- ```
4038
-
4039
- </details>
4040
-
4041
- ---
4042
-
4043
- ### `configureDistributionV3`
4044
-
4045
- Configure the distribution for the portal's custom domain
4046
-
4047
- `GET /v3/portal/configure-distribution`
4048
-
4049
- ```ts
4050
- const { data } = await client.configureDistributionV3({
4051
- portal_id: 'example',
4052
- })
4053
- ```
4054
-
4055
- <details>
4056
- <summary>Response</summary>
4057
-
4058
- ```json
4059
- {
4060
- "domainName": "dsj8op4ha01jha23.cloudfront.net"
4061
- }
4062
- ```
4063
-
4064
- </details>
4065
-
4066
- ---
4067
-
4068
- ### `getAllOrders`
4069
-
4070
- Get all orders for the portal user
4071
-
4072
- `GET /v2/portal/order`
4073
-
4074
- ```ts
4075
- const { data } = await client.getAllOrders({
4076
- from: 1,
4077
- size: 1,
4078
- })
4079
- ```
4080
-
4081
- <details>
4082
- <summary>Response</summary>
4083
-
4084
- ```json
4085
- {
4086
- "data": [
4087
- {
4088
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4089
- "_title": "Example Entity",
4090
- "_org": "123",
4091
- "_tags": ["example", "mock"],
4092
- "_created_at": "2021-02-09T12:41:43.662Z",
4093
- "_updated_at": "2021-02-09T12:41:43.662Z",
4094
- "_schema": "order",
4095
- "journey_actions": {
4096
- "journey_id": "string",
4097
- "action_label": {
4098
- "en": "string",
4099
- "de": "string"
4100
- },
4101
- "slug": "string",
4102
- "rules": [
4103
- {
4104
- "entity": "string",
4105
- "attribute": "string",
4106
- "attribute_value": "string"
4107
- }
4108
- ]
4109
- }
4110
- }
4111
- ]
4112
- }
4113
- ```
4114
-
4115
- </details>
4116
-
4117
- ---
4118
-
4119
- ### `postOrderAcceptance`
4120
-
4121
- Accept/decline an offer by id
4122
-
4123
- `POST /v2/portal/order/{id}/acceptance`
4124
-
4125
- ```ts
4126
- const { data } = await client.postOrderAcceptance(
4127
- {
4128
- id: '123e4567-e89b-12d3-a456-426614174000',
4129
- },
4130
- {
4131
- decision: 'accept'
4132
- },
4133
- )
4134
- ```
4135
-
4136
- <details>
4137
- <summary>Response</summary>
4138
-
4139
- ```json
4140
- {
4141
- "data": {
4142
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4143
- "_title": "Example Entity",
4144
- "_org": "123",
4145
- "_tags": ["example", "mock"],
4146
- "_created_at": "2021-02-09T12:41:43.662Z",
4147
- "_updated_at": "2021-02-09T12:41:43.662Z",
4148
- "_schema": "order"
4149
- }
4150
- }
4151
- ```
4152
-
4153
- </details>
4154
-
4155
- ---
4156
-
4157
- ### `getOrder`
4158
-
4159
- Get an order by id
4160
-
4161
- `GET /v2/portal/order/{id}`
4162
-
4163
- ```ts
4164
- const { data } = await client.getOrder({
4165
- id: '123e4567-e89b-12d3-a456-426614174000',
4166
- })
4167
- ```
4168
-
4169
- <details>
4170
- <summary>Response</summary>
4171
-
4172
- ```json
4173
- {
4174
- "entity": {
4175
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4176
- "_title": "Example Entity",
4177
- "_org": "123",
4178
- "_tags": ["example", "mock"],
4179
- "_created_at": "2021-02-09T12:41:43.662Z",
4180
- "_updated_at": "2021-02-09T12:41:43.662Z",
4181
- "_schema": "order"
4182
- },
4183
- "files": [
4184
- {
4185
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4186
- "_title": "Example Entity",
4187
- "_org": "123",
4188
- "_tags": ["example", "mock"],
4189
- "_created_at": "2021-02-09T12:41:43.662Z",
4190
- "_updated_at": "2021-02-09T12:41:43.662Z",
4191
- "_schema": "file"
4192
- }
4193
- ],
4194
- "relations": [
4195
- {
4196
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4197
- "_title": "Example Entity",
4198
- "_org": "123",
4199
- "_tags": ["example", "mock"],
4200
- "_created_at": "2021-02-09T12:41:43.662Z",
4201
- "_updated_at": "2021-02-09T12:41:43.662Z",
4202
- "templates_output": {},
4203
- "_schema": "contact"
4204
- }
4205
- ],
4206
- "products": [
4207
- {
4208
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4209
- "_title": "Example Entity",
4210
- "_org": "123",
4211
- "_tags": ["example", "mock"],
4212
- "_created_at": "2021-02-09T12:41:43.662Z",
4213
- "_updated_at": "2021-02-09T12:41:43.662Z",
4214
- "_schema": "product"
4215
- }
4216
- ],
4217
- "crossSellableProducts": [
4218
- {
4219
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4220
- "_title": "Example Entity",
4221
- "_org": "123",
4222
- "_tags": ["example", "mock"],
4223
- "_created_at": "2021-02-09T12:41:43.662Z",
4224
- "_updated_at": "2021-02-09T12:41:43.662Z",
4225
- "_schema": "product"
4226
- }
4227
- ],
4228
- "workflow": [
4229
- {
4230
- "id": "8gja72h6kas6h",
4231
- "name": "Lead Qualification",
4232
- "trigger": "MANUAL",
4233
- "status": "STARTED",
4234
- "creationTime": "2021-04-27T12:01:13.000Z",
4235
- "lastUpdateTime": "2021-04-27T12:01:13.000Z",
4236
- "dueDate": "2021-04-27T12:01:13.000Z",
4237
- "assignedTo": ["252", "29052"],
4238
- "flow": []
4239
- }
4240
- ],
4241
- "journey_actions": [
4242
- {
4243
- "journey_id": "string",
4244
- "action_label": {},
4245
- "slug": "string",
4246
- "rules": []
4247
- }
4248
- ]
4249
- }
4250
- ```
4251
-
4252
- </details>
4253
-
4254
- ---
4255
-
4256
- ### `updateOrder`
4257
-
4258
- Update an order by id
4259
-
4260
- `PATCH /v2/portal/order/{id}`
4261
-
4262
- ```ts
4263
- const { data } = await client.updateOrder(
4264
- {
4265
- id: '123e4567-e89b-12d3-a456-426614174000',
4266
- },
4267
- {},
4268
- )
4269
- ```
4270
-
4271
- <details>
4272
- <summary>Response</summary>
4273
-
4274
- ```json
4275
- {
4276
- "data": {
4277
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4278
- "_title": "Example Entity",
4279
- "_org": "123",
4280
- "_tags": ["example", "mock"],
4281
- "_created_at": "2021-02-09T12:41:43.662Z",
4282
- "_updated_at": "2021-02-09T12:41:43.662Z",
4283
- "_schema": "order"
4284
- }
4285
- }
4286
- ```
4287
-
4288
- </details>
4289
-
4290
- ---
4291
-
4292
- ### `getAllOpportunities`
4293
-
4294
- Get all opportunities of a portal user
4295
-
4296
- `GET /v2/portal/opportunity`
4297
-
4298
- ```ts
4299
- const { data } = await client.getAllOpportunities({
4300
- from: 1,
4301
- size: 1,
4302
- })
4303
- ```
4304
-
4305
- <details>
4306
- <summary>Response</summary>
4307
-
4308
- ```json
4309
- {
4310
- "data": [
4311
- {
4312
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4313
- "_title": "Example Entity",
4314
- "_org": "123",
4315
- "_tags": ["example", "mock"],
4316
- "_created_at": "2021-02-09T12:41:43.662Z",
4317
- "_updated_at": "2021-02-09T12:41:43.662Z",
4318
- "_schema": "opportunity",
4319
- "journey_actions": {
4320
- "journey_id": "string",
4321
- "action_label": {
4322
- "en": "string",
4323
- "de": "string"
4324
- },
4325
- "slug": "string",
4326
- "rules": [
4327
- {
4328
- "entity": "string",
4329
- "attribute": "string",
4330
- "attribute_value": "string"
4331
- }
4332
- ]
4333
- }
4334
- }
4335
- ]
4336
- }
4337
- ```
4338
-
4339
- </details>
4340
-
4341
- ---
4342
-
4343
- ### `getSearchableAttributesForOpportunities`
4344
-
4345
- Get all opportunity searchable attributes for a portal user
4346
-
4347
- `GET /v2/portal/opportunities/searchable-attributes`
4348
-
4349
- ```ts
4350
- const { data } = await client.getSearchableAttributesForOpportunities({
4351
- from: 1,
4352
- size: 1,
4353
- })
4354
- ```
4355
-
4356
- <details>
4357
- <summary>Response</summary>
4358
-
4359
- ```json
4360
- {
4361
- "data": [
4362
- {
4363
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4364
- "_title": "Example Entity",
4365
- "_org": "123",
4366
- "_tags": ["example", "mock"],
4367
- "_created_at": "2021-02-09T12:41:43.662Z",
4368
- "_updated_at": "2021-02-09T12:41:43.662Z",
4369
- "_schema": "opportunity"
4370
- }
4371
- ]
4372
- }
4373
- ```
4374
-
4375
- </details>
4376
-
4377
- ---
4378
-
4379
- ### `getSearchResultsForOpportunities`
4380
-
4381
- Get all opportunity with the given serached attributes
4382
-
4383
- `POST /v2/portal/opportunities/search`
4384
-
4385
- ```ts
4386
- const { data } = await client.getSearchResultsForOpportunities(
4387
- {
4388
- from: 1,
4389
- size: 1,
4390
- },
4391
- {
4392
- addresses: ['string'],
4393
- customers: ['string'],
4394
- purposes: ['5da0a718-c822-403d-9f5d-20d4584e0528'],
4395
- workflows: [
4396
- {}
4397
- ]
4398
- },
4399
- )
4400
- ```
4401
-
4402
- <details>
4403
- <summary>Response</summary>
4404
-
4405
- ```json
4406
- {
4407
- "data": [
4408
- {
4409
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4410
- "_title": "Example Entity",
4411
- "_org": "123",
4412
- "_tags": ["example", "mock"],
4413
- "_created_at": "2021-02-09T12:41:43.662Z",
4414
- "_updated_at": "2021-02-09T12:41:43.662Z",
4415
- "_schema": "opportunity"
4416
- }
4417
- ]
4418
- }
4419
- ```
4420
-
4421
- </details>
4422
-
4423
- ---
4424
-
4425
- ### `getOpportunity`
4426
-
4427
- Get an opportunity by id
4428
-
4429
- `GET /v2/portal/opportunities/{id}`
4430
-
4431
- ```ts
4432
- const { data } = await client.getOpportunity({
4433
- id: '123e4567-e89b-12d3-a456-426614174000',
4434
- })
4435
- ```
4436
-
4437
- <details>
4438
- <summary>Response</summary>
4439
-
4440
- ```json
4441
- {
4442
- "entity": {
4443
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4444
- "_title": "Example Entity",
4445
- "_org": "123",
4446
- "_tags": ["example", "mock"],
4447
- "_created_at": "2021-02-09T12:41:43.662Z",
4448
- "_updated_at": "2021-02-09T12:41:43.662Z",
4449
- "_schema": "opportunity"
4450
- },
4451
- "orders": [
4452
- {
4453
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4454
- "_title": "Example Entity",
4455
- "_org": "123",
4456
- "_tags": ["example", "mock"],
4457
- "_created_at": "2021-02-09T12:41:43.662Z",
4458
- "_updated_at": "2021-02-09T12:41:43.662Z",
4459
- "_schema": "order"
4460
- }
4461
- ],
4462
- "files": [
4463
- {
4464
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4465
- "_title": "Example Entity",
4466
- "_org": "123",
4467
- "_tags": ["example", "mock"],
4468
- "_created_at": "2021-02-09T12:41:43.662Z",
4469
- "_updated_at": "2021-02-09T12:41:43.662Z",
4470
- "_schema": "file"
4471
- }
4472
- ],
4473
- "relations": [
4474
- {
4475
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4476
- "_title": "Example Entity",
4477
- "_org": "123",
4478
- "_tags": ["example", "mock"],
4479
- "_created_at": "2021-02-09T12:41:43.662Z",
4480
- "_updated_at": "2021-02-09T12:41:43.662Z",
4481
- "templates_output": {},
4482
- "_schema": "contact"
4483
- }
4484
- ],
4485
- "workflow": [
4486
- {
4487
- "id": "8gja72h6kas6h",
4488
- "name": "Lead Qualification",
4489
- "trigger": "MANUAL",
4490
- "status": "STARTED",
4491
- "creationTime": "2021-04-27T12:01:13.000Z",
4492
- "lastUpdateTime": "2021-04-27T12:01:13.000Z",
4493
- "dueDate": "2021-04-27T12:01:13.000Z",
4494
- "assignedTo": ["252", "29052"],
4495
- "flow": []
4496
- }
4497
- ],
4498
- "journey_actions": [
4499
- {
4500
- "journey_id": "string",
4501
- "action_label": {},
4502
- "slug": "string",
4503
- "rules": []
4504
- }
4505
- ]
3683
+ ```
3684
+
3685
+ ---
3686
+
3687
+ ### `userExists`
3688
+
3689
+ Checks whether a user exists in the portal
3690
+
3691
+ `GET /v2/portal/public/user/exists`
3692
+
3693
+ ```ts
3694
+ const { data } = await client.userExists({
3695
+ email: 'example',
3696
+ org_id: 'example',
3697
+ origin: 'example',
3698
+ })
3699
+ ```
3700
+
3701
+ <details>
3702
+ <summary>Response</summary>
3703
+
3704
+ ```json
3705
+ {
3706
+ "exists": true
4506
3707
  }
4507
3708
  ```
4508
3709
 
@@ -4510,19 +3711,18 @@ const { data } = await client.getOpportunity({
4510
3711
 
4511
3712
  ---
4512
3713
 
4513
- ### `updateOpportunity`
3714
+ ### `userExistsV3`
4514
3715
 
4515
- Update an opportunity by id
3716
+ Checks whether a user exists in the portal
4516
3717
 
4517
- `PATCH /v2/portal/opportunities/{id}`
3718
+ `GET /v3/portal/public/user/exists`
4518
3719
 
4519
3720
  ```ts
4520
- const { data } = await client.updateOpportunity(
4521
- {
4522
- id: '123e4567-e89b-12d3-a456-426614174000',
4523
- },
4524
- {},
4525
- )
3721
+ const { data } = await client.userExistsV3({
3722
+ email: 'example',
3723
+ org_id: 'example',
3724
+ portal_id: 'example',
3725
+ })
4526
3726
  ```
4527
3727
 
4528
3728
  <details>
@@ -4530,15 +3730,7 @@ const { data } = await client.updateOpportunity(
4530
3730
 
4531
3731
  ```json
4532
3732
  {
4533
- "data": {
4534
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4535
- "_title": "Example Entity",
4536
- "_org": "123",
4537
- "_tags": ["example", "mock"],
4538
- "_created_at": "2021-02-09T12:41:43.662Z",
4539
- "_updated_at": "2021-02-09T12:41:43.662Z",
4540
- "_schema": "opportunity"
4541
- }
3733
+ "exists": true
4542
3734
  }
4543
3735
  ```
4544
3736
 
@@ -4546,17 +3738,21 @@ const { data } = await client.updateOpportunity(
4546
3738
 
4547
3739
  ---
4548
3740
 
4549
- ### `getAllRequests`
3741
+ ### `getRecipientsToNotifyOnAutomation`
4550
3742
 
4551
- Get all opportunities & orders of a portal user
3743
+ Get recipients to notify on automation
4552
3744
 
4553
- `GET /v2/portal/request`
3745
+ `POST /v2/portal/recipients-to-notify`
4554
3746
 
4555
3747
  ```ts
4556
- const { data } = await client.getAllRequests({
4557
- from: 1,
4558
- size: 1,
4559
- })
3748
+ const { data } = await client.getRecipientsToNotifyOnAutomation(
3749
+ null,
3750
+ {
3751
+ emails: ['john@doe.com'],
3752
+ template_id: '5da0a718-c822-403d-9f5d-20d4584e0528',
3753
+ context_id: '5da0a718-c822-403d-9f5d-20d4584e0528'
3754
+ },
3755
+ )
4560
3756
  ```
4561
3757
 
4562
3758
  <details>
@@ -4564,18 +3760,13 @@ const { data } = await client.getAllRequests({
4564
3760
 
4565
3761
  ```json
4566
3762
  {
4567
- "hits": 1,
4568
- "results": [
3763
+ "recipients": [
4569
3764
  {
4570
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4571
- "_title": "Example Entity",
4572
- "_org": "123",
4573
- "_tags": ["example", "mock"],
4574
- "_created_at": "2021-02-09T12:41:43.662Z",
4575
- "_updated_at": "2021-02-09T12:41:43.662Z",
4576
- "_schema": "opportunity"
3765
+ "email": "john@doe.com",
3766
+ "recipient_id": "5da0a718-c822-403d-9f5d-20d4584e0528"
4577
3767
  }
4578
- ]
3768
+ ],
3769
+ "message": "string"
4579
3770
  }
4580
3771
  ```
4581
3772
 
@@ -4583,16 +3774,15 @@ const { data } = await client.getAllRequests({
4583
3774
 
4584
3775
  ---
4585
3776
 
4586
- ### `getAllContracts`
3777
+ ### `configureDistribution`
4587
3778
 
4588
- Get all contracts for a portal user
3779
+ Configure the distribution for the portal's custom domain
4589
3780
 
4590
- `GET /v2/portal/contract`
3781
+ `GET /v2/portal/configure-distribution`
4591
3782
 
4592
3783
  ```ts
4593
- const { data } = await client.getAllContracts({
4594
- from: 1,
4595
- size: 1,
3784
+ const { data } = await client.configureDistribution({
3785
+ origin: 'example',
4596
3786
  })
4597
3787
  ```
4598
3788
 
@@ -4601,53 +3791,7 @@ const { data } = await client.getAllContracts({
4601
3791
 
4602
3792
  ```json
4603
3793
  {
4604
- "data": [
4605
- {
4606
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4607
- "_title": "Example Entity",
4608
- "_org": "123",
4609
- "_tags": ["example", "mock"],
4610
- "_created_at": "2021-02-09T12:41:43.662Z",
4611
- "_updated_at": "2021-02-09T12:41:43.662Z",
4612
- "contract_name": "Grid Contract",
4613
- "contract_number": "12345",
4614
- "status": "approved",
4615
- "description": "This contract is for the supply of widgets.",
4616
- "account_number": "67890",
4617
- "branch": "power",
4618
- "billing_address": "123 Main St, Anytown",
4619
- "delivery_address": "456 Elm St, Anytown",
4620
- "additional_addresses": "789 Oak St, Anytown",
4621
- "termination_date": "2022-01-01",
4622
- "termination_reason": "Non-payment",
4623
- "billing_period": "monthly",
4624
- "billing_duration_amount": 30,
4625
- "renewal_duration_amount": 365,
4626
- "renewal_duration_unit": "years",
4627
- "notice_time_amount": 30,
4628
- "notice_time_unit": "months",
4629
- "start_date": "2021-01-01",
4630
- "billing_due_day": 2,
4631
- "installment_amount": 10050,
4632
- "balance": 8990,
4633
- "balance_currency": "EUR",
4634
- "journey_actions": {
4635
- "journey_id": "string",
4636
- "action_label": {
4637
- "en": "string",
4638
- "de": "string"
4639
- },
4640
- "slug": "string",
4641
- "rules": [
4642
- {
4643
- "entity": "string",
4644
- "attribute": "string",
4645
- "attribute_value": "string"
4646
- }
4647
- ]
4648
- }
4649
- }
4650
- ]
3794
+ "domainName": "dsj8op4ha01jha23.cloudfront.net"
4651
3795
  }
4652
3796
  ```
4653
3797
 
@@ -4655,15 +3799,15 @@ const { data } = await client.getAllContracts({
4655
3799
 
4656
3800
  ---
4657
3801
 
4658
- ### `getContract`
3802
+ ### `configureDistributionV3`
4659
3803
 
4660
- Get a contract by id
3804
+ Configure the distribution for the portal's custom domain
4661
3805
 
4662
- `GET /v2/portal/contract/{id}`
3806
+ `GET /v3/portal/configure-distribution`
4663
3807
 
4664
3808
  ```ts
4665
- const { data } = await client.getContract({
4666
- id: '123e4567-e89b-12d3-a456-426614174000',
3809
+ const { data } = await client.configureDistributionV3({
3810
+ portal_id: 'example',
4667
3811
  })
4668
3812
  ```
4669
3813
 
@@ -4672,102 +3816,7 @@ const { data } = await client.getContract({
4672
3816
 
4673
3817
  ```json
4674
3818
  {
4675
- "entity": {
4676
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4677
- "_title": "Example Entity",
4678
- "_org": "123",
4679
- "_tags": ["example", "mock"],
4680
- "_created_at": "2021-02-09T12:41:43.662Z",
4681
- "_updated_at": "2021-02-09T12:41:43.662Z",
4682
- "contract_name": "Grid Contract",
4683
- "contract_number": "12345",
4684
- "status": "approved",
4685
- "description": "This contract is for the supply of widgets.",
4686
- "account_number": "67890",
4687
- "branch": "power",
4688
- "billing_address": "123 Main St, Anytown",
4689
- "delivery_address": "456 Elm St, Anytown",
4690
- "additional_addresses": "789 Oak St, Anytown",
4691
- "termination_date": "2022-01-01",
4692
- "termination_reason": "Non-payment",
4693
- "billing_period": "monthly",
4694
- "billing_duration_amount": 30,
4695
- "renewal_duration_amount": 365,
4696
- "renewal_duration_unit": "years",
4697
- "notice_time_amount": 30,
4698
- "notice_time_unit": "months",
4699
- "start_date": "2021-01-01",
4700
- "billing_due_day": 2,
4701
- "installment_amount": 10050,
4702
- "balance": 8990,
4703
- "balance_currency": "EUR"
4704
- },
4705
- "orders": [
4706
- {
4707
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4708
- "_title": "Example Entity",
4709
- "_org": "123",
4710
- "_tags": ["example", "mock"],
4711
- "_created_at": "2021-02-09T12:41:43.662Z",
4712
- "_updated_at": "2021-02-09T12:41:43.662Z",
4713
- "_schema": "order"
4714
- }
4715
- ],
4716
- "meters": [
4717
- {
4718
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4719
- "_title": "Example Entity",
4720
- "_org": "123",
4721
- "_tags": ["example", "mock"],
4722
- "_created_at": "2021-02-09T12:41:43.662Z",
4723
- "_updated_at": "2021-02-09T12:41:43.662Z",
4724
- "_schema": "meter"
4725
- }
4726
- ],
4727
- "files": [
4728
- {
4729
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4730
- "_title": "Example Entity",
4731
- "_org": "123",
4732
- "_tags": ["example", "mock"],
4733
- "_created_at": "2021-02-09T12:41:43.662Z",
4734
- "_updated_at": "2021-02-09T12:41:43.662Z",
4735
- "_schema": "file"
4736
- }
4737
- ],
4738
- "relations": [
4739
- {
4740
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
4741
- "_title": "Example Entity",
4742
- "_org": "123",
4743
- "_tags": ["example", "mock"],
4744
- "_created_at": "2021-02-09T12:41:43.662Z",
4745
- "_updated_at": "2021-02-09T12:41:43.662Z",
4746
- "templates_output": {},
4747
- "_schema": "contact"
4748
- }
4749
- ],
4750
- "workflow": [
4751
- {
4752
- "id": "8gja72h6kas6h",
4753
- "name": "Lead Qualification",
4754
- "trigger": "MANUAL",
4755
- "status": "STARTED",
4756
- "creationTime": "2021-04-27T12:01:13.000Z",
4757
- "lastUpdateTime": "2021-04-27T12:01:13.000Z",
4758
- "dueDate": "2021-04-27T12:01:13.000Z",
4759
- "assignedTo": ["252", "29052"],
4760
- "flow": []
4761
- }
4762
- ],
4763
- "journey_actions": [
4764
- {
4765
- "journey_id": "string",
4766
- "action_label": {},
4767
- "slug": "string",
4768
- "rules": []
4769
- }
4770
- ]
3819
+ "domainName": "dsj8op4ha01jha23.cloudfront.net"
4771
3820
  }
4772
3821
  ```
4773
3822
 
@@ -4775,18 +3824,20 @@ const { data } = await client.getContract({
4775
3824
 
4776
3825
  ---
4777
3826
 
4778
- ### `updateContract`
3827
+ ### `postOrderAcceptance`
4779
3828
 
4780
- Update a contract by id
3829
+ Accept/decline an offer by id
4781
3830
 
4782
- `PATCH /v2/portal/contract/{id}`
3831
+ `POST /v2/portal/order/{id}/acceptance`
4783
3832
 
4784
3833
  ```ts
4785
- const { data } = await client.updateContract(
3834
+ const { data } = await client.postOrderAcceptance(
4786
3835
  {
4787
3836
  id: '123e4567-e89b-12d3-a456-426614174000',
4788
3837
  },
4789
- {},
3838
+ {
3839
+ decision: 'accept'
3840
+ },
4790
3841
  )
4791
3842
  ```
4792
3843
 
@@ -4802,28 +3853,7 @@ const { data } = await client.updateContract(
4802
3853
  "_tags": ["example", "mock"],
4803
3854
  "_created_at": "2021-02-09T12:41:43.662Z",
4804
3855
  "_updated_at": "2021-02-09T12:41:43.662Z",
4805
- "contract_name": "Grid Contract",
4806
- "contract_number": "12345",
4807
- "status": "approved",
4808
- "description": "This contract is for the supply of widgets.",
4809
- "account_number": "67890",
4810
- "branch": "power",
4811
- "billing_address": "123 Main St, Anytown",
4812
- "delivery_address": "456 Elm St, Anytown",
4813
- "additional_addresses": "789 Oak St, Anytown",
4814
- "termination_date": "2022-01-01",
4815
- "termination_reason": "Non-payment",
4816
- "billing_period": "monthly",
4817
- "billing_duration_amount": 30,
4818
- "renewal_duration_amount": 365,
4819
- "renewal_duration_unit": "years",
4820
- "notice_time_amount": 30,
4821
- "notice_time_unit": "months",
4822
- "start_date": "2021-01-01",
4823
- "billing_due_day": 2,
4824
- "installment_amount": 10050,
4825
- "balance": 8990,
4826
- "balance_currency": "EUR"
3856
+ "_schema": "order"
4827
3857
  }
4828
3858
  }
4829
3859
  ```
@@ -5241,53 +4271,6 @@ const { data } = await client.getRegistrationIdentifiers()
5241
4271
 
5242
4272
  ---
5243
4273
 
5244
- ### `getFileById`
5245
-
5246
- Fetch a document with ID
5247
-
5248
- `GET /v2/portal/user/file/{id}`
5249
-
5250
- ```ts
5251
- const { data } = await client.getFileById({
5252
- id: '123e4567-e89b-12d3-a456-426614174000',
5253
- })
5254
- ```
5255
-
5256
- <details>
5257
- <summary>Response</summary>
5258
-
5259
- ```json
5260
- {
5261
- "file": {
5262
- "_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
5263
- "_title": "Example Entity",
5264
- "_org": "123",
5265
- "_tags": ["example", "mock"],
5266
- "_created_at": "2021-02-09T12:41:43.662Z",
5267
- "_updated_at": "2021-02-09T12:41:43.662Z",
5268
- "_schema": "file",
5269
- "filename": "document.pdf",
5270
- "access_control": "private",
5271
- "file_date": "2021-02-09T12:41:43.662Z",
5272
- "public_url": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
5273
- "type": "document",
5274
- "mime_type": "application/pdf",
5275
- "_relations": [
5276
- {
5277
- "entity_id": "5da0a718-c822-403d-9f5d-20d4584e0528",
5278
- "_schema": "contact",
5279
- "_title": "Opportunity ABC"
5280
- }
5281
- ],
5282
- "is_new": true
5283
- }
5284
- }
5285
- ```
5286
-
5287
- </details>
5288
-
5289
- ---
5290
-
5291
4274
  ### `trackFileDownloaded`
5292
4275
 
5293
4276
  Track that user has downloaded a file
@@ -5499,7 +4482,8 @@ const { data } = await client.loginToPortalAsUser(
5499
4482
  null,
5500
4483
  {
5501
4484
  email: 'portal-customer@email.com',
5502
- origin: 'string'
4485
+ origin: 'string',
4486
+ portal_id: 'string'
5503
4487
  },
5504
4488
  )
5505
4489
  ```
@@ -6193,7 +5177,16 @@ const { data } = await client.getPortalPage({
6193
5177
  "slug": "dashboard",
6194
5178
  "path": "/dashboard",
6195
5179
  "schema": ["string"],
6196
- "visibility": {},
5180
+ "visibility": {
5181
+ "is_hidden": true,
5182
+ "hidden_in_app": true,
5183
+ "start_date": "1970-01-01T00:00:00.000Z",
5184
+ "end_date": "1970-01-01T00:00:00.000Z",
5185
+ "visible_for_targets": ["string"],
5186
+ "visible_for_operator": "and",
5187
+ "hidden_for_targets": ["string"],
5188
+ "hidden_for_operator": "and"
5189
+ },
6197
5190
  "content": {},
6198
5191
  "design": {},
6199
5192
  "blocks": {},
@@ -6230,7 +5223,16 @@ const { data } = await client.updatePortalPage(
6230
5223
  slug: 'dashboard',
6231
5224
  path: '/dashboard',
6232
5225
  schema: ['string'],
6233
- visibility: {},
5226
+ visibility: {
5227
+ is_hidden: true,
5228
+ hidden_in_app: true,
5229
+ start_date: '1970-01-01T00:00:00.000Z',
5230
+ end_date: '1970-01-01T00:00:00.000Z',
5231
+ visible_for_targets: ['string'],
5232
+ visible_for_operator: 'and',
5233
+ hidden_for_targets: ['string'],
5234
+ hidden_for_operator: 'and'
5235
+ },
6234
5236
  content: {},
6235
5237
  design: {},
6236
5238
  blocks: {},
@@ -6255,7 +5257,16 @@ const { data } = await client.updatePortalPage(
6255
5257
  "slug": "dashboard",
6256
5258
  "path": "/dashboard",
6257
5259
  "schema": ["string"],
6258
- "visibility": {},
5260
+ "visibility": {
5261
+ "is_hidden": true,
5262
+ "hidden_in_app": true,
5263
+ "start_date": "1970-01-01T00:00:00.000Z",
5264
+ "end_date": "1970-01-01T00:00:00.000Z",
5265
+ "visible_for_targets": ["string"],
5266
+ "visible_for_operator": "and",
5267
+ "hidden_for_targets": ["string"],
5268
+ "hidden_for_operator": "and"
5269
+ },
6259
5270
  "content": {},
6260
5271
  "design": {},
6261
5272
  "blocks": {},
@@ -6316,7 +5327,16 @@ const { data } = await client.getPortalPages({
6316
5327
  "slug": "dashboard",
6317
5328
  "path": "/dashboard",
6318
5329
  "schema": ["string"],
6319
- "visibility": {},
5330
+ "visibility": {
5331
+ "is_hidden": true,
5332
+ "hidden_in_app": true,
5333
+ "start_date": "1970-01-01T00:00:00.000Z",
5334
+ "end_date": "1970-01-01T00:00:00.000Z",
5335
+ "visible_for_targets": ["string"],
5336
+ "visible_for_operator": "and",
5337
+ "hidden_for_targets": ["string"],
5338
+ "hidden_for_operator": "and"
5339
+ },
6320
5340
  "content": {},
6321
5341
  "design": {},
6322
5342
  "blocks": {},
@@ -6354,7 +5374,16 @@ const { data } = await client.createPortalPage(
6354
5374
  slug: 'dashboard',
6355
5375
  path: '/dashboard',
6356
5376
  schema: ['string'],
6357
- visibility: {},
5377
+ visibility: {
5378
+ is_hidden: true,
5379
+ hidden_in_app: true,
5380
+ start_date: '1970-01-01T00:00:00.000Z',
5381
+ end_date: '1970-01-01T00:00:00.000Z',
5382
+ visible_for_targets: ['string'],
5383
+ visible_for_operator: 'and',
5384
+ hidden_for_targets: ['string'],
5385
+ hidden_for_operator: 'and'
5386
+ },
6358
5387
  content: {},
6359
5388
  design: {},
6360
5389
  blocks: {},
@@ -6379,7 +5408,16 @@ const { data } = await client.createPortalPage(
6379
5408
  "slug": "dashboard",
6380
5409
  "path": "/dashboard",
6381
5410
  "schema": ["string"],
6382
- "visibility": {},
5411
+ "visibility": {
5412
+ "is_hidden": true,
5413
+ "hidden_in_app": true,
5414
+ "start_date": "1970-01-01T00:00:00.000Z",
5415
+ "end_date": "1970-01-01T00:00:00.000Z",
5416
+ "visible_for_targets": ["string"],
5417
+ "visible_for_operator": "and",
5418
+ "hidden_for_targets": ["string"],
5419
+ "hidden_for_operator": "and"
5420
+ },
6383
5421
  "content": {},
6384
5422
  "design": {},
6385
5423
  "blocks": {},
@@ -6424,7 +5462,16 @@ const { data } = await client.getPublicPages({
6424
5462
  "slug": "dashboard",
6425
5463
  "path": "/dashboard",
6426
5464
  "schema": ["string"],
6427
- "visibility": {},
5465
+ "visibility": {
5466
+ "is_hidden": true,
5467
+ "hidden_in_app": true,
5468
+ "start_date": "1970-01-01T00:00:00.000Z",
5469
+ "end_date": "1970-01-01T00:00:00.000Z",
5470
+ "visible_for_targets": ["string"],
5471
+ "visible_for_operator": "and",
5472
+ "hidden_for_targets": ["string"],
5473
+ "hidden_for_operator": "and"
5474
+ },
6428
5475
  "content": {},
6429
5476
  "design": {},
6430
5477
  "blocks": {},
@@ -6462,7 +5509,16 @@ const { data } = await client.interpolatePortalPages(
6462
5509
  slug: 'dashboard',
6463
5510
  path: '/dashboard',
6464
5511
  schema: ['string'],
6465
- visibility: {},
5512
+ visibility: {
5513
+ is_hidden: true,
5514
+ hidden_in_app: true,
5515
+ start_date: '1970-01-01T00:00:00.000Z',
5516
+ end_date: '1970-01-01T00:00:00.000Z',
5517
+ visible_for_targets: ['string'],
5518
+ visible_for_operator: 'and',
5519
+ hidden_for_targets: ['string'],
5520
+ hidden_for_operator: 'and'
5521
+ },
6466
5522
  content: {},
6467
5523
  design: {},
6468
5524
  blocks: {},
@@ -6484,7 +5540,8 @@ const { data } = await client.interpolatePortalPages(
6484
5540
  entity_id: '5da0a718-c822-403d-9f5d-20d4584e0528',
6485
5541
  entity_schema: 'contract'
6486
5542
  }
6487
- ]
5543
+ ],
5544
+ evaluate_targeting: true
6488
5545
  },
6489
5546
  )
6490
5547
  ```
@@ -6498,7 +5555,16 @@ const { data } = await client.interpolatePortalPages(
6498
5555
  "slug": "dashboard",
6499
5556
  "path": "/dashboard",
6500
5557
  "schema": ["string"],
6501
- "visibility": {},
5558
+ "visibility": {
5559
+ "is_hidden": true,
5560
+ "hidden_in_app": true,
5561
+ "start_date": "1970-01-01T00:00:00.000Z",
5562
+ "end_date": "1970-01-01T00:00:00.000Z",
5563
+ "visible_for_targets": ["string"],
5564
+ "visible_for_operator": "and",
5565
+ "hidden_for_targets": ["string"],
5566
+ "hidden_for_operator": "and"
5567
+ },
6502
5568
  "content": {},
6503
5569
  "design": {},
6504
5570
  "blocks": {},
@@ -6540,7 +5606,16 @@ const { data } = await client.getDefaultPages()
6540
5606
  "slug": "dashboard",
6541
5607
  "path": "/dashboard",
6542
5608
  "schema": ["string"],
6543
- "visibility": {},
5609
+ "visibility": {
5610
+ "is_hidden": true,
5611
+ "hidden_in_app": true,
5612
+ "start_date": "1970-01-01T00:00:00.000Z",
5613
+ "end_date": "1970-01-01T00:00:00.000Z",
5614
+ "visible_for_targets": ["string"],
5615
+ "visible_for_operator": "and",
5616
+ "hidden_for_targets": ["string"],
5617
+ "hidden_for_operator": "and"
5618
+ },
6544
5619
  "content": {},
6545
5620
  "design": {},
6546
5621
  "blocks": {},
@@ -6576,7 +5651,18 @@ const { data } = await client.createPortalPageBlock(
6576
5651
  },
6577
5652
  {
6578
5653
  props: {
6579
- visibility: {},
5654
+ visibility: {
5655
+ is_hidden: true,
5656
+ hidden_on_mobile: true,
5657
+ hidden_on_desktop: true,
5658
+ hidden_in_app: true,
5659
+ start_date: '1970-01-01T00:00:00.000Z',
5660
+ end_date: '1970-01-01T00:00:00.000Z',
5661
+ visible_for_targets: ['string'],
5662
+ visible_for_operator: 'and',
5663
+ hidden_for_targets: ['string'],
5664
+ hidden_for_operator: 'and'
5665
+ },
6580
5666
  content: {},
6581
5667
  design: {}
6582
5668
  },
@@ -6593,7 +5679,18 @@ const { data } = await client.createPortalPageBlock(
6593
5679
  ```json
6594
5680
  {
6595
5681
  "props": {
6596
- "visibility": {},
5682
+ "visibility": {
5683
+ "is_hidden": true,
5684
+ "hidden_on_mobile": true,
5685
+ "hidden_on_desktop": true,
5686
+ "hidden_in_app": true,
5687
+ "start_date": "1970-01-01T00:00:00.000Z",
5688
+ "end_date": "1970-01-01T00:00:00.000Z",
5689
+ "visible_for_targets": ["string"],
5690
+ "visible_for_operator": "and",
5691
+ "hidden_for_targets": ["string"],
5692
+ "hidden_for_operator": "and"
5693
+ },
6597
5694
  "content": {},
6598
5695
  "design": {}
6599
5696
  },
@@ -6627,7 +5724,18 @@ const { data } = await client.getPortalPageBlocks({
6627
5724
  [
6628
5725
  {
6629
5726
  "props": {
6630
- "visibility": {},
5727
+ "visibility": {
5728
+ "is_hidden": true,
5729
+ "hidden_on_mobile": true,
5730
+ "hidden_on_desktop": true,
5731
+ "hidden_in_app": true,
5732
+ "start_date": "1970-01-01T00:00:00.000Z",
5733
+ "end_date": "1970-01-01T00:00:00.000Z",
5734
+ "visible_for_targets": ["string"],
5735
+ "visible_for_operator": "and",
5736
+ "hidden_for_targets": ["string"],
5737
+ "hidden_for_operator": "and"
5738
+ },
6631
5739
  "content": {},
6632
5740
  "design": {}
6633
5741
  },
@@ -6662,7 +5770,18 @@ const { data } = await client.getPortalPageBlock({
6662
5770
  ```json
6663
5771
  {
6664
5772
  "props": {
6665
- "visibility": {},
5773
+ "visibility": {
5774
+ "is_hidden": true,
5775
+ "hidden_on_mobile": true,
5776
+ "hidden_on_desktop": true,
5777
+ "hidden_in_app": true,
5778
+ "start_date": "1970-01-01T00:00:00.000Z",
5779
+ "end_date": "1970-01-01T00:00:00.000Z",
5780
+ "visible_for_targets": ["string"],
5781
+ "visible_for_operator": "and",
5782
+ "hidden_for_targets": ["string"],
5783
+ "hidden_for_operator": "and"
5784
+ },
6666
5785
  "content": {},
6667
5786
  "design": {}
6668
5787
  },
@@ -6691,7 +5810,18 @@ const { data } = await client.updatePortalPageBlock(
6691
5810
  },
6692
5811
  {
6693
5812
  props: {
6694
- visibility: {},
5813
+ visibility: {
5814
+ is_hidden: true,
5815
+ hidden_on_mobile: true,
5816
+ hidden_on_desktop: true,
5817
+ hidden_in_app: true,
5818
+ start_date: '1970-01-01T00:00:00.000Z',
5819
+ end_date: '1970-01-01T00:00:00.000Z',
5820
+ visible_for_targets: ['string'],
5821
+ visible_for_operator: 'and',
5822
+ hidden_for_targets: ['string'],
5823
+ hidden_for_operator: 'and'
5824
+ },
6695
5825
  content: {},
6696
5826
  design: {}
6697
5827
  },
@@ -6708,7 +5838,18 @@ const { data } = await client.updatePortalPageBlock(
6708
5838
  ```json
6709
5839
  {
6710
5840
  "props": {
6711
- "visibility": {},
5841
+ "visibility": {
5842
+ "is_hidden": true,
5843
+ "hidden_on_mobile": true,
5844
+ "hidden_on_desktop": true,
5845
+ "hidden_in_app": true,
5846
+ "start_date": "1970-01-01T00:00:00.000Z",
5847
+ "end_date": "1970-01-01T00:00:00.000Z",
5848
+ "visible_for_targets": ["string"],
5849
+ "visible_for_operator": "and",
5850
+ "hidden_for_targets": ["string"],
5851
+ "hidden_for_operator": "and"
5852
+ },
6712
5853
  "content": {},
6713
5854
  "design": {}
6714
5855
  },
@@ -7066,7 +6207,7 @@ const { data } = await client.createPortalConfig(
7066
6207
  slug: 'dashboard',
7067
6208
  path: '/dashboard',
7068
6209
  schema: ['string'],
7069
- visibility: {},
6210
+ visibility: { /* ... */ },
7070
6211
  content: {},
7071
6212
  design: {},
7072
6213
  blocks: {},
@@ -7759,7 +6900,7 @@ const { data } = await client.putPortalConfig(
7759
6900
  slug: 'dashboard',
7760
6901
  path: '/dashboard',
7761
6902
  schema: ['string'],
7762
- visibility: {},
6903
+ visibility: { /* ... */ },
7763
6904
  content: {},
7764
6905
  design: {},
7765
6906
  blocks: {},
@@ -8131,7 +7272,8 @@ const { data } = await client.invitePartner(
8131
7272
  {
8132
7273
  email: 'string',
8133
7274
  represents_contact_list: ['5da0a718-c822-403d-9f5d-20d4584e0528'],
8134
- contact_data: {}
7275
+ contact_data: {},
7276
+ portal_user_data: {}
8135
7277
  },
8136
7278
  )
8137
7279
  ```
@@ -10368,6 +9510,10 @@ type ExtensionHookRegistrationIdentifiersCheck = {
10368
9510
  result?: string
10369
9511
  }
10370
9512
  use_static_ips?: boolean
9513
+ secure_proxy?: {
9514
+ integration_id: string // uuid
9515
+ use_case_slug: string
9516
+ }
10371
9517
  }
10372
9518
  ```
10373
9519
 
@@ -10408,6 +9554,10 @@ type ExtensionHookContractIdentification = {
10408
9554
  en: string
10409
9555
  }
10410
9556
  use_static_ips?: boolean
9557
+ secure_proxy?: {
9558
+ integration_id: string // uuid
9559
+ use_case_slug: string
9560
+ }
10411
9561
  }
10412
9562
  ```
10413
9563
 
@@ -10447,6 +9597,10 @@ type ExtensionHookMeterReadingPlausibilityCheck = {
10447
9597
  lower_limit?: string
10448
9598
  }
10449
9599
  use_static_ips?: boolean
9600
+ secure_proxy?: {
9601
+ integration_id: string // uuid
9602
+ use_case_slug: string
9603
+ }
10450
9604
  }
10451
9605
  ```
10452
9606
 
@@ -10481,6 +9635,10 @@ type ExtensionHookPriceDataRetrieval = {
10481
9635
  dataPath?: string
10482
9636
  }
10483
9637
  use_static_ips?: boolean
9638
+ secure_proxy?: {
9639
+ integration_id: string // uuid
9640
+ use_case_slug: string
9641
+ }
10484
9642
  }
10485
9643
  ```
10486
9644
 
@@ -10515,6 +9673,10 @@ type ExtensionHookConsumptionDataRetrieval = {
10515
9673
  dataPath?: string
10516
9674
  }
10517
9675
  use_static_ips?: boolean
9676
+ secure_proxy?: {
9677
+ integration_id: string // uuid
9678
+ use_case_slug: string
9679
+ }
10518
9680
  }
10519
9681
  ```
10520
9682
 
@@ -10549,6 +9711,21 @@ type ExtensionHookCostDataRetrieval = {
10549
9711
  dataPath?: string
10550
9712
  }
10551
9713
  use_static_ips?: boolean
9714
+ secure_proxy?: {
9715
+ integration_id: string // uuid
9716
+ use_case_slug: string
9717
+ }
9718
+ }
9719
+ ```
9720
+
9721
+ ### `SecureProxyConfig`
9722
+
9723
+ Configuration for routing requests through the ERP Integration secure proxy. Mutually exclusive with use_static_ips.
9724
+
9725
+ ```ts
9726
+ type SecureProxyConfig = {
9727
+ integration_id: string // uuid
9728
+ use_case_slug: string
10552
9729
  }
10553
9730
  ```
10554
9731
 
@@ -10912,7 +10089,18 @@ type SSOCallbackResponse = {
10912
10089
 
10913
10090
  ```ts
10914
10091
  type BlockProps = {
10915
- visibility?: Record<string, unknown>
10092
+ visibility?: {
10093
+ is_hidden?: boolean
10094
+ hidden_on_mobile?: boolean
10095
+ hidden_on_desktop?: boolean
10096
+ hidden_in_app?: boolean
10097
+ start_date?: string // date-time
10098
+ end_date?: string // date-time
10099
+ visible_for_targets?: string[]
10100
+ visible_for_operator?: "and" | "or"
10101
+ hidden_for_targets?: string[]
10102
+ hidden_for_operator?: "and" | "or"
10103
+ }
10916
10104
  content?: Record<string, unknown>
10917
10105
  design?: Record<string, unknown>
10918
10106
  }
@@ -10931,7 +10119,18 @@ type BlockType = string
10931
10119
  ```ts
10932
10120
  type BlockRequest = {
10933
10121
  props?: {
10934
- visibility?: Record<string, unknown>
10122
+ visibility?: {
10123
+ is_hidden?: { ... }
10124
+ hidden_on_mobile?: { ... }
10125
+ hidden_on_desktop?: { ... }
10126
+ hidden_in_app?: { ... }
10127
+ start_date?: { ... }
10128
+ end_date?: { ... }
10129
+ visible_for_targets?: { ... }
10130
+ visible_for_operator?: { ... }
10131
+ hidden_for_targets?: { ... }
10132
+ hidden_for_operator?: { ... }
10133
+ }
10935
10134
  content?: Record<string, unknown>
10936
10135
  design?: Record<string, unknown>
10937
10136
  }
@@ -10954,7 +10153,18 @@ type BlockId = string // uuid
10954
10153
  ```ts
10955
10154
  type Block = {
10956
10155
  props?: {
10957
- visibility?: Record<string, unknown>
10156
+ visibility?: {
10157
+ is_hidden?: { ... }
10158
+ hidden_on_mobile?: { ... }
10159
+ hidden_on_desktop?: { ... }
10160
+ hidden_in_app?: { ... }
10161
+ start_date?: { ... }
10162
+ end_date?: { ... }
10163
+ visible_for_targets?: { ... }
10164
+ visible_for_operator?: { ... }
10165
+ hidden_for_targets?: { ... }
10166
+ hidden_for_operator?: { ... }
10167
+ }
10958
10168
  content?: Record<string, unknown>
10959
10169
  design?: Record<string, unknown>
10960
10170
  }
@@ -10972,7 +10182,16 @@ type PageRequest = {
10972
10182
  slug: string
10973
10183
  path?: string
10974
10184
  schema?: string[]
10975
- visibility?: Record<string, unknown>
10185
+ visibility?: {
10186
+ is_hidden?: boolean
10187
+ hidden_in_app?: boolean
10188
+ start_date?: string // date-time
10189
+ end_date?: string // date-time
10190
+ visible_for_targets?: string[]
10191
+ visible_for_operator?: "and" | "or"
10192
+ hidden_for_targets?: string[]
10193
+ hidden_for_operator?: "and" | "or"
10194
+ }
10976
10195
  content?: Record<string, unknown>
10977
10196
  design?: Record<string, unknown>
10978
10197
  blocks?: Record<string, {
@@ -11005,7 +10224,16 @@ type Page = {
11005
10224
  slug: string
11006
10225
  path?: string
11007
10226
  schema?: string[]
11008
- visibility?: Record<string, unknown>
10227
+ visibility?: {
10228
+ is_hidden?: boolean
10229
+ hidden_in_app?: boolean
10230
+ start_date?: string // date-time
10231
+ end_date?: string // date-time
10232
+ visible_for_targets?: string[]
10233
+ visible_for_operator?: "and" | "or"
10234
+ hidden_for_targets?: string[]
10235
+ hidden_for_operator?: "and" | "or"
10236
+ }
11009
10237
  content?: Record<string, unknown>
11010
10238
  design?: Record<string, unknown>
11011
10239
  blocks?: Record<string, {