@medalsocial/sdk 1.4.0 → 1.6.0
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/README.md +178 -2
- package/dist/openapi/medal-social.openapi.json +1180 -21
- package/dist/src/index.d.mts +886 -187
- package/dist/src/index.d.ts +886 -187
- package/dist/src/index.js +360 -13
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +354 -13
- package/dist/src/index.mjs.map +1 -1
- package/dist/src/openapi.generated.d.mts +597 -0
- package/dist/src/openapi.generated.d.ts +597 -0
- package/dist/src/openapi.generated.js.map +1 -1
- package/openapi/medal-social.openapi.yaml +700 -0
- package/package.json +1 -1
- package/skills/resources/SKILL.md +3 -2
|
@@ -29,6 +29,19 @@ tags:
|
|
|
29
29
|
description: Read helpdesk conversations, reply, and manage assignment/status.
|
|
30
30
|
- name: Webhooks
|
|
31
31
|
description: Manage webhook endpoints and inspect their deliveries.
|
|
32
|
+
- name: Capabilities
|
|
33
|
+
description: >-
|
|
34
|
+
Mint short-lived capability confirmation tokens for confirmable write
|
|
35
|
+
routes.
|
|
36
|
+
- name: Channels
|
|
37
|
+
description: >-
|
|
38
|
+
Partner channel connect — mint hosted connect links and manage the
|
|
39
|
+
resulting channel connections.
|
|
40
|
+
- name: Scan
|
|
41
|
+
description: >-
|
|
42
|
+
Company & website scans (Nettsjekk) — queue a scan by URL, organisation
|
|
43
|
+
number, or company name, poll the result, and search the Norwegian
|
|
44
|
+
company registry.
|
|
32
45
|
paths:
|
|
33
46
|
/api/v1/posts:
|
|
34
47
|
get:
|
|
@@ -926,6 +939,226 @@ paths:
|
|
|
926
939
|
$ref: "#/components/schemas/ApiResponse_WebhookTestResult"
|
|
927
940
|
default:
|
|
928
941
|
$ref: "#/components/responses/ApiError"
|
|
942
|
+
/api/v1/capability-confirmations:
|
|
943
|
+
post:
|
|
944
|
+
tags: [Capabilities]
|
|
945
|
+
operationId: issueCapabilityConfirmation
|
|
946
|
+
summary: Issue a capability confirmation token
|
|
947
|
+
description: >-
|
|
948
|
+
Mints a short-lived `X-Capability-Confirmation` token for one pending
|
|
949
|
+
write. Confirmable write routes require BOTH `Idempotency-Key` and
|
|
950
|
+
`X-Capability-Confirmation` when the credential holds the capability
|
|
951
|
+
scope directly; API keys with legacy scopes are exempt. The token is
|
|
952
|
+
bound to the workspace, auth subject, method, path, required scopes and
|
|
953
|
+
idempotency key, and expires within 15 minutes. `user_approved: true`
|
|
954
|
+
asserts that a human on the caller's side approved this exact action.
|
|
955
|
+
requestBody:
|
|
956
|
+
required: true
|
|
957
|
+
content:
|
|
958
|
+
application/json:
|
|
959
|
+
schema:
|
|
960
|
+
$ref: "#/components/schemas/IssueCapabilityConfirmationInput"
|
|
961
|
+
responses:
|
|
962
|
+
"200":
|
|
963
|
+
description: Minted confirmation token.
|
|
964
|
+
content:
|
|
965
|
+
application/json:
|
|
966
|
+
schema:
|
|
967
|
+
$ref: "#/components/schemas/ApiResponse_CapabilityConfirmation"
|
|
968
|
+
default:
|
|
969
|
+
$ref: "#/components/responses/ApiError"
|
|
970
|
+
/api/v1/channels/connect-links:
|
|
971
|
+
post:
|
|
972
|
+
tags: [Channels]
|
|
973
|
+
operationId: createChannelConnectLink
|
|
974
|
+
summary: Mint a hosted connect link
|
|
975
|
+
description: >-
|
|
976
|
+
Mints a single-use hosted connect link that lets an external person
|
|
977
|
+
(no Medal account required) attach a channel account (e.g.
|
|
978
|
+
`telegram_inbox`) to the workspace's helpdesk. The response's
|
|
979
|
+
`data.url` contains the one-time link token EXACTLY ONCE — an
|
|
980
|
+
idempotent replay (same `Idempotency-Key`) returns the link WITHOUT
|
|
981
|
+
`url`. Requires the `channel.connect.manage` scope; OAuth callers
|
|
982
|
+
additionally need the workspace `admin` role.
|
|
983
|
+
requestBody:
|
|
984
|
+
required: true
|
|
985
|
+
content:
|
|
986
|
+
application/json:
|
|
987
|
+
schema:
|
|
988
|
+
$ref: "#/components/schemas/CreateConnectLinkInput"
|
|
989
|
+
responses:
|
|
990
|
+
"201":
|
|
991
|
+
description: Minted connect link, including the one-time `url`.
|
|
992
|
+
content:
|
|
993
|
+
application/json:
|
|
994
|
+
schema:
|
|
995
|
+
$ref: "#/components/schemas/ApiResponse_ConnectLinkCreateResult"
|
|
996
|
+
default:
|
|
997
|
+
$ref: "#/components/responses/ApiError"
|
|
998
|
+
get:
|
|
999
|
+
tags: [Channels]
|
|
1000
|
+
operationId: listChannelConnectLinks
|
|
1001
|
+
summary: List connect links
|
|
1002
|
+
description: >-
|
|
1003
|
+
Link tokens are never returned. Newest first, cursor-paginated. The
|
|
1004
|
+
`channel_type` / `status` filters are applied within each page, so a
|
|
1005
|
+
page may hold fewer than `limit` items while `pagination.has_more` is
|
|
1006
|
+
still true — page off `has_more`, not the item count.
|
|
1007
|
+
parameters:
|
|
1008
|
+
- name: limit
|
|
1009
|
+
in: query
|
|
1010
|
+
schema:
|
|
1011
|
+
type: integer
|
|
1012
|
+
minimum: 1
|
|
1013
|
+
maximum: 100
|
|
1014
|
+
description: Page size (default 50, capped at 100).
|
|
1015
|
+
- $ref: "#/components/parameters/Cursor"
|
|
1016
|
+
- name: channel_type
|
|
1017
|
+
in: query
|
|
1018
|
+
schema:
|
|
1019
|
+
type: string
|
|
1020
|
+
- name: status
|
|
1021
|
+
in: query
|
|
1022
|
+
schema:
|
|
1023
|
+
$ref: "#/components/schemas/ConnectLinkStatus"
|
|
1024
|
+
responses:
|
|
1025
|
+
"200":
|
|
1026
|
+
description: Connect links page.
|
|
1027
|
+
content:
|
|
1028
|
+
application/json:
|
|
1029
|
+
schema:
|
|
1030
|
+
$ref: "#/components/schemas/PaginatedResponse_ConnectLink"
|
|
1031
|
+
default:
|
|
1032
|
+
$ref: "#/components/responses/ApiError"
|
|
1033
|
+
/api/v1/channels/connect-links/{id}:
|
|
1034
|
+
parameters:
|
|
1035
|
+
- $ref: "#/components/parameters/Id"
|
|
1036
|
+
delete:
|
|
1037
|
+
tags: [Channels]
|
|
1038
|
+
operationId: revokeChannelConnectLink
|
|
1039
|
+
summary: Revoke a connect link
|
|
1040
|
+
description: >-
|
|
1041
|
+
Revokes a pending connect link so it can no longer be consumed. OAuth
|
|
1042
|
+
callers need the workspace `admin` role.
|
|
1043
|
+
responses:
|
|
1044
|
+
"200":
|
|
1045
|
+
description: Revoke result.
|
|
1046
|
+
content:
|
|
1047
|
+
application/json:
|
|
1048
|
+
schema:
|
|
1049
|
+
$ref: "#/components/schemas/ApiResponse_ConnectLinkRevokeResult"
|
|
1050
|
+
default:
|
|
1051
|
+
$ref: "#/components/responses/ApiError"
|
|
1052
|
+
/api/v1/channels/connections:
|
|
1053
|
+
get:
|
|
1054
|
+
tags: [Channels]
|
|
1055
|
+
operationId: listChannelConnections
|
|
1056
|
+
summary: List channel connections
|
|
1057
|
+
description: >-
|
|
1058
|
+
The workspace's channel connections in a generic, channel-agnostic
|
|
1059
|
+
shape. Newest first, cursor-paginated. Rows that are not projectable
|
|
1060
|
+
as connections are dropped within the page, so a page may hold fewer
|
|
1061
|
+
than `limit` items while `pagination.has_more` is still true — page
|
|
1062
|
+
off `has_more`, not the item count.
|
|
1063
|
+
parameters:
|
|
1064
|
+
- name: limit
|
|
1065
|
+
in: query
|
|
1066
|
+
schema:
|
|
1067
|
+
type: integer
|
|
1068
|
+
minimum: 1
|
|
1069
|
+
maximum: 100
|
|
1070
|
+
description: Page size (default 50, capped at 100).
|
|
1071
|
+
- $ref: "#/components/parameters/Cursor"
|
|
1072
|
+
responses:
|
|
1073
|
+
"200":
|
|
1074
|
+
description: Channel connections page.
|
|
1075
|
+
content:
|
|
1076
|
+
application/json:
|
|
1077
|
+
schema:
|
|
1078
|
+
$ref: "#/components/schemas/PaginatedResponse_ChannelConnection"
|
|
1079
|
+
default:
|
|
1080
|
+
$ref: "#/components/responses/ApiError"
|
|
1081
|
+
/api/v1/channels/connections/{id}:
|
|
1082
|
+
parameters:
|
|
1083
|
+
- $ref: "#/components/parameters/Id"
|
|
1084
|
+
delete:
|
|
1085
|
+
tags: [Channels]
|
|
1086
|
+
operationId: disconnectChannelConnection
|
|
1087
|
+
summary: Disconnect a channel connection
|
|
1088
|
+
description: >-
|
|
1089
|
+
Disconnects a connected channel account (best-effort platform logout,
|
|
1090
|
+
then local revoke). Emits a `helpdesk.channel_disconnected` webhook
|
|
1091
|
+
event with `reason: "api_disconnect"` if the account was previously
|
|
1092
|
+
connected. OAuth callers need the workspace `admin` role.
|
|
1093
|
+
responses:
|
|
1094
|
+
"200":
|
|
1095
|
+
description: Disconnect result.
|
|
1096
|
+
content:
|
|
1097
|
+
application/json:
|
|
1098
|
+
schema:
|
|
1099
|
+
$ref: "#/components/schemas/ApiResponse_ChannelConnectionDisconnectResult"
|
|
1100
|
+
default:
|
|
1101
|
+
$ref: "#/components/responses/ApiError"
|
|
1102
|
+
/api/v1/scan:
|
|
1103
|
+
post:
|
|
1104
|
+
tags: [Scan]
|
|
1105
|
+
operationId: createScan
|
|
1106
|
+
summary: Queue a company/site scan
|
|
1107
|
+
description: >-
|
|
1108
|
+
Queues an asynchronous scan. Provide exactly one of `url`, `orgnr`, or
|
|
1109
|
+
`name`; poll the returned id via `GET /api/v1/scan/{id}`.
|
|
1110
|
+
requestBody:
|
|
1111
|
+
required: true
|
|
1112
|
+
content:
|
|
1113
|
+
application/json:
|
|
1114
|
+
schema:
|
|
1115
|
+
$ref: "#/components/schemas/ScanCreateInput"
|
|
1116
|
+
responses:
|
|
1117
|
+
"202":
|
|
1118
|
+
description: Scan job queued.
|
|
1119
|
+
content:
|
|
1120
|
+
application/json:
|
|
1121
|
+
schema:
|
|
1122
|
+
$ref: "#/components/schemas/ApiResponse_ScanCreateResult"
|
|
1123
|
+
default:
|
|
1124
|
+
$ref: "#/components/responses/ApiError"
|
|
1125
|
+
/api/v1/scan/companies:
|
|
1126
|
+
get:
|
|
1127
|
+
tags: [Scan]
|
|
1128
|
+
operationId: searchScanCompanies
|
|
1129
|
+
summary: Search the Norwegian company registry
|
|
1130
|
+
parameters:
|
|
1131
|
+
- name: q
|
|
1132
|
+
in: query
|
|
1133
|
+
required: true
|
|
1134
|
+
schema:
|
|
1135
|
+
type: string
|
|
1136
|
+
minLength: 2
|
|
1137
|
+
responses:
|
|
1138
|
+
"200":
|
|
1139
|
+
description: Registry matches (top 5, relevance-ranked).
|
|
1140
|
+
content:
|
|
1141
|
+
application/json:
|
|
1142
|
+
schema:
|
|
1143
|
+
$ref: "#/components/schemas/ApiResponse_ScanCompanyArray"
|
|
1144
|
+
default:
|
|
1145
|
+
$ref: "#/components/responses/ApiError"
|
|
1146
|
+
/api/v1/scan/{id}:
|
|
1147
|
+
parameters:
|
|
1148
|
+
- $ref: "#/components/parameters/Id"
|
|
1149
|
+
get:
|
|
1150
|
+
tags: [Scan]
|
|
1151
|
+
operationId: getScan
|
|
1152
|
+
summary: Get a scan job
|
|
1153
|
+
responses:
|
|
1154
|
+
"200":
|
|
1155
|
+
description: Scan job status and, once done, the findings payload.
|
|
1156
|
+
content:
|
|
1157
|
+
application/json:
|
|
1158
|
+
schema:
|
|
1159
|
+
$ref: "#/components/schemas/ApiResponse_ScanJob"
|
|
1160
|
+
default:
|
|
1161
|
+
$ref: "#/components/responses/ApiError"
|
|
929
1162
|
components:
|
|
930
1163
|
securitySchemes:
|
|
931
1164
|
bearerAuth:
|
|
@@ -2045,6 +2278,8 @@ components:
|
|
|
2045
2278
|
- author_user_id
|
|
2046
2279
|
- author_name
|
|
2047
2280
|
- body
|
|
2281
|
+
- delivery_status
|
|
2282
|
+
- delivery_error
|
|
2048
2283
|
- created_at
|
|
2049
2284
|
properties:
|
|
2050
2285
|
id:
|
|
@@ -2061,9 +2296,26 @@ components:
|
|
|
2061
2296
|
type: [string, "null"]
|
|
2062
2297
|
body:
|
|
2063
2298
|
type: string
|
|
2299
|
+
delivery_status:
|
|
2300
|
+
oneOf:
|
|
2301
|
+
- $ref: "#/components/schemas/HelpdeskMessageDeliveryStatus"
|
|
2302
|
+
- type: "null"
|
|
2303
|
+
description: >-
|
|
2304
|
+
Outbound delivery state, or `null` for inbound messages and
|
|
2305
|
+
internal notes. A `201` from `POST /api/v1/helpdesk/replies` means
|
|
2306
|
+
the reply was accepted, NOT delivered — the channel hand-off is
|
|
2307
|
+
asynchronous, so poll this field (or subscribe to
|
|
2308
|
+
`helpdesk.message_delivery_updated`) to learn the outcome.
|
|
2309
|
+
delivery_error:
|
|
2310
|
+
type: [string, "null"]
|
|
2311
|
+
description: >-
|
|
2312
|
+
Last send error for a `failed` outbound message, otherwise `null`.
|
|
2064
2313
|
created_at:
|
|
2065
2314
|
type: integer
|
|
2066
2315
|
description: Unix timestamp in milliseconds.
|
|
2316
|
+
HelpdeskMessageDeliveryStatus:
|
|
2317
|
+
type: string
|
|
2318
|
+
enum: [pending, sent, delivered, failed]
|
|
2067
2319
|
UpdateHelpdeskConversationInput:
|
|
2068
2320
|
type: object
|
|
2069
2321
|
minProperties: 1
|
|
@@ -2254,9 +2506,22 @@ components:
|
|
|
2254
2506
|
const: deleted
|
|
2255
2507
|
WebhookDelivery:
|
|
2256
2508
|
type: object
|
|
2509
|
+
description: >-
|
|
2510
|
+
A delivery attempt record. `id` is the same value sent as the
|
|
2511
|
+
`X-Medal-Delivery-Id` and `Idempotency-Key` headers on the outbound
|
|
2512
|
+
request. Deliveries never carry payload bodies (payloads can contain
|
|
2513
|
+
customer PII). The correlation fields are derived from the stored event
|
|
2514
|
+
and fail closed to `null` when no canonical event exists — e.g.
|
|
2515
|
+
`test.ping` deliveries or events that have aged out of retention.
|
|
2257
2516
|
required:
|
|
2258
2517
|
- id
|
|
2259
2518
|
- event_type
|
|
2519
|
+
- resource_id
|
|
2520
|
+
- conversation_id
|
|
2521
|
+
- message_id
|
|
2522
|
+
- connection_ref
|
|
2523
|
+
- channel
|
|
2524
|
+
- channel_connection_id
|
|
2260
2525
|
- status
|
|
2261
2526
|
- attempt_count
|
|
2262
2527
|
- next_attempt_at
|
|
@@ -2270,6 +2535,19 @@ components:
|
|
|
2270
2535
|
type: string
|
|
2271
2536
|
event_type:
|
|
2272
2537
|
type: string
|
|
2538
|
+
resource_id:
|
|
2539
|
+
type: [string, "null"]
|
|
2540
|
+
description: Primary subject id of the announced event, or `null`.
|
|
2541
|
+
conversation_id:
|
|
2542
|
+
type: [string, "null"]
|
|
2543
|
+
message_id:
|
|
2544
|
+
type: [string, "null"]
|
|
2545
|
+
connection_ref:
|
|
2546
|
+
type: [string, "null"]
|
|
2547
|
+
channel:
|
|
2548
|
+
type: [string, "null"]
|
|
2549
|
+
channel_connection_id:
|
|
2550
|
+
type: [string, "null"]
|
|
2273
2551
|
status:
|
|
2274
2552
|
type: string
|
|
2275
2553
|
enum: [pending, delivered, dead_letter]
|
|
@@ -2299,6 +2577,130 @@ components:
|
|
|
2299
2577
|
status:
|
|
2300
2578
|
type: string
|
|
2301
2579
|
const: queued
|
|
2580
|
+
ConnectLinkStatus:
|
|
2581
|
+
type: string
|
|
2582
|
+
enum: [pending, consumed, expired, revoked]
|
|
2583
|
+
ChannelConnectionState:
|
|
2584
|
+
type: string
|
|
2585
|
+
enum: [connecting, active, disconnected, disabled]
|
|
2586
|
+
CreateConnectLinkInput:
|
|
2587
|
+
type: object
|
|
2588
|
+
required: [channel_type]
|
|
2589
|
+
properties:
|
|
2590
|
+
channel_type:
|
|
2591
|
+
type: string
|
|
2592
|
+
maxLength: 64
|
|
2593
|
+
description: Channel type to connect (e.g. `telegram_inbox`).
|
|
2594
|
+
label:
|
|
2595
|
+
type: string
|
|
2596
|
+
maxLength: 100
|
|
2597
|
+
description: Display label shown on the hosted connect page.
|
|
2598
|
+
redirect_url:
|
|
2599
|
+
type: string
|
|
2600
|
+
format: uri
|
|
2601
|
+
maxLength: 2000
|
|
2602
|
+
description: >-
|
|
2603
|
+
URL the hosted page redirects to after a successful connect — must
|
|
2604
|
+
be https.
|
|
2605
|
+
ConnectLinkCreateResult:
|
|
2606
|
+
type: object
|
|
2607
|
+
required: [id, channel_type, label, status, expires_at]
|
|
2608
|
+
properties:
|
|
2609
|
+
id:
|
|
2610
|
+
type: string
|
|
2611
|
+
url:
|
|
2612
|
+
type: string
|
|
2613
|
+
format: uri
|
|
2614
|
+
description: >-
|
|
2615
|
+
Single-use hosted connect URL containing the one-time link token —
|
|
2616
|
+
present ONLY in the live create response. An idempotent replay of
|
|
2617
|
+
the create request omits it; the token can never be retrieved
|
|
2618
|
+
again.
|
|
2619
|
+
channel_type:
|
|
2620
|
+
type: string
|
|
2621
|
+
label:
|
|
2622
|
+
type: [string, "null"]
|
|
2623
|
+
status:
|
|
2624
|
+
$ref: "#/components/schemas/ConnectLinkStatus"
|
|
2625
|
+
expires_at:
|
|
2626
|
+
type: integer
|
|
2627
|
+
description: Unix timestamp in milliseconds.
|
|
2628
|
+
ConnectLink:
|
|
2629
|
+
type: object
|
|
2630
|
+
required:
|
|
2631
|
+
- id
|
|
2632
|
+
- channel_type
|
|
2633
|
+
- label
|
|
2634
|
+
- status
|
|
2635
|
+
- consumed_connection_ref
|
|
2636
|
+
- expires_at
|
|
2637
|
+
- created_at
|
|
2638
|
+
properties:
|
|
2639
|
+
id:
|
|
2640
|
+
type: string
|
|
2641
|
+
channel_type:
|
|
2642
|
+
type: string
|
|
2643
|
+
label:
|
|
2644
|
+
type: [string, "null"]
|
|
2645
|
+
status:
|
|
2646
|
+
$ref: "#/components/schemas/ConnectLinkStatus"
|
|
2647
|
+
consumed_connection_ref:
|
|
2648
|
+
type: [string, "null"]
|
|
2649
|
+
description: >-
|
|
2650
|
+
Stable ref of the connection created by consuming this link, or
|
|
2651
|
+
`null`.
|
|
2652
|
+
expires_at:
|
|
2653
|
+
type: integer
|
|
2654
|
+
description: Unix timestamp in milliseconds.
|
|
2655
|
+
created_at:
|
|
2656
|
+
type: integer
|
|
2657
|
+
description: Unix timestamp in milliseconds.
|
|
2658
|
+
ConnectLinkRevokeResult:
|
|
2659
|
+
type: object
|
|
2660
|
+
required: [id, status]
|
|
2661
|
+
properties:
|
|
2662
|
+
id:
|
|
2663
|
+
type: string
|
|
2664
|
+
status:
|
|
2665
|
+
type: string
|
|
2666
|
+
const: revoked
|
|
2667
|
+
ChannelConnection:
|
|
2668
|
+
type: object
|
|
2669
|
+
required:
|
|
2670
|
+
- id
|
|
2671
|
+
- channel_type
|
|
2672
|
+
- label
|
|
2673
|
+
- state
|
|
2674
|
+
- masked_identity
|
|
2675
|
+
- last_activity_at
|
|
2676
|
+
- helpdesk_connection_id
|
|
2677
|
+
properties:
|
|
2678
|
+
id:
|
|
2679
|
+
type: string
|
|
2680
|
+
channel_type:
|
|
2681
|
+
type: string
|
|
2682
|
+
label:
|
|
2683
|
+
type: [string, "null"]
|
|
2684
|
+
state:
|
|
2685
|
+
$ref: "#/components/schemas/ChannelConnectionState"
|
|
2686
|
+
masked_identity:
|
|
2687
|
+
type: string
|
|
2688
|
+
description: Privacy-preserving identity handle (e.g. a masked phone number).
|
|
2689
|
+
last_activity_at:
|
|
2690
|
+
type: [integer, "null"]
|
|
2691
|
+
description: Unix timestamp in milliseconds, or `null` if never active.
|
|
2692
|
+
helpdesk_connection_id:
|
|
2693
|
+
type: [string, "null"]
|
|
2694
|
+
description: Linked helpdesk channel connection ID, or `null`.
|
|
2695
|
+
ChannelConnectionDisconnectResult:
|
|
2696
|
+
type: object
|
|
2697
|
+
required: [id, state]
|
|
2698
|
+
properties:
|
|
2699
|
+
id:
|
|
2700
|
+
type: string
|
|
2701
|
+
state:
|
|
2702
|
+
type: string
|
|
2703
|
+
const: disconnected
|
|
2302
2704
|
ApiResponse_PostCreateResult:
|
|
2303
2705
|
$ref: "#/components/schemas/Envelope_PostCreateResult"
|
|
2304
2706
|
ApiResponse_PostDetail:
|
|
@@ -2347,6 +2749,12 @@ components:
|
|
|
2347
2749
|
$ref: "#/components/schemas/Envelope_GdprExportArray"
|
|
2348
2750
|
ApiResponse_GdprExport:
|
|
2349
2751
|
$ref: "#/components/schemas/Envelope_GdprExport"
|
|
2752
|
+
ApiResponse_ScanCreateResult:
|
|
2753
|
+
$ref: "#/components/schemas/Envelope_ScanCreateResult"
|
|
2754
|
+
ApiResponse_ScanCompanyArray:
|
|
2755
|
+
$ref: "#/components/schemas/Envelope_ScanCompanyArray"
|
|
2756
|
+
ApiResponse_ScanJob:
|
|
2757
|
+
$ref: "#/components/schemas/Envelope_ScanJob"
|
|
2350
2758
|
ApiResponse_ConsentResult:
|
|
2351
2759
|
$ref: "#/components/schemas/Envelope_ConsentResult"
|
|
2352
2760
|
ApiResponse_ConsentRecordArray:
|
|
@@ -2369,6 +2777,21 @@ components:
|
|
|
2369
2777
|
$ref: "#/components/schemas/Envelope_WebhookDeliveryArray"
|
|
2370
2778
|
ApiResponse_WebhookTestResult:
|
|
2371
2779
|
$ref: "#/components/schemas/Envelope_WebhookTestResult"
|
|
2780
|
+
ApiResponse_ConnectLinkCreateResult:
|
|
2781
|
+
$ref: "#/components/schemas/Envelope_ConnectLinkCreateResult"
|
|
2782
|
+
# Deprecated: the channels listings are cursor-paginated and now respond
|
|
2783
|
+
# with PaginatedResponse_ConnectLink / PaginatedResponse_ChannelConnection.
|
|
2784
|
+
# These unpaginated aliases are retained (unreferenced by any operation)
|
|
2785
|
+
# so consumers importing the generated contract via
|
|
2786
|
+
# `@medalsocial/sdk/openapi-types` or `OpenApiComponents` keep compiling.
|
|
2787
|
+
ApiResponse_ConnectLinkArray:
|
|
2788
|
+
$ref: "#/components/schemas/Envelope_ConnectLinkArray"
|
|
2789
|
+
ApiResponse_ConnectLinkRevokeResult:
|
|
2790
|
+
$ref: "#/components/schemas/Envelope_ConnectLinkRevokeResult"
|
|
2791
|
+
ApiResponse_ChannelConnectionArray:
|
|
2792
|
+
$ref: "#/components/schemas/Envelope_ChannelConnectionArray"
|
|
2793
|
+
ApiResponse_ChannelConnectionDisconnectResult:
|
|
2794
|
+
$ref: "#/components/schemas/Envelope_ChannelConnectionDisconnectResult"
|
|
2372
2795
|
PaginatedResponse_Post:
|
|
2373
2796
|
type: object
|
|
2374
2797
|
required: [data, pagination]
|
|
@@ -2429,6 +2852,26 @@ components:
|
|
|
2429
2852
|
$ref: "#/components/schemas/HelpdeskMessage"
|
|
2430
2853
|
pagination:
|
|
2431
2854
|
$ref: "#/components/schemas/Pagination"
|
|
2855
|
+
PaginatedResponse_ConnectLink:
|
|
2856
|
+
type: object
|
|
2857
|
+
required: [data, pagination]
|
|
2858
|
+
properties:
|
|
2859
|
+
data:
|
|
2860
|
+
type: array
|
|
2861
|
+
items:
|
|
2862
|
+
$ref: "#/components/schemas/ConnectLink"
|
|
2863
|
+
pagination:
|
|
2864
|
+
$ref: "#/components/schemas/Pagination"
|
|
2865
|
+
PaginatedResponse_ChannelConnection:
|
|
2866
|
+
type: object
|
|
2867
|
+
required: [data, pagination]
|
|
2868
|
+
properties:
|
|
2869
|
+
data:
|
|
2870
|
+
type: array
|
|
2871
|
+
items:
|
|
2872
|
+
$ref: "#/components/schemas/ChannelConnection"
|
|
2873
|
+
pagination:
|
|
2874
|
+
$ref: "#/components/schemas/Pagination"
|
|
2432
2875
|
Envelope_PostCreateResult:
|
|
2433
2876
|
type: object
|
|
2434
2877
|
required: [data]
|
|
@@ -2559,6 +3002,131 @@ components:
|
|
|
2559
3002
|
properties:
|
|
2560
3003
|
data:
|
|
2561
3004
|
$ref: "#/components/schemas/DealRemoveResult"
|
|
3005
|
+
ScanCreateInput:
|
|
3006
|
+
type: object
|
|
3007
|
+
description: Provide exactly one of `url`, `orgnr`, or `name`.
|
|
3008
|
+
oneOf:
|
|
3009
|
+
- required: [url]
|
|
3010
|
+
not:
|
|
3011
|
+
anyOf: [{ required: [orgnr] }, { required: [name] }]
|
|
3012
|
+
- required: [orgnr]
|
|
3013
|
+
not:
|
|
3014
|
+
anyOf: [{ required: [url] }, { required: [name] }]
|
|
3015
|
+
- required: [name]
|
|
3016
|
+
not:
|
|
3017
|
+
anyOf: [{ required: [url] }, { required: [orgnr] }]
|
|
3018
|
+
properties:
|
|
3019
|
+
url:
|
|
3020
|
+
type: string
|
|
3021
|
+
minLength: 4
|
|
3022
|
+
maxLength: 500
|
|
3023
|
+
orgnr:
|
|
3024
|
+
type: string
|
|
3025
|
+
pattern: "^\\d{9}$"
|
|
3026
|
+
name:
|
|
3027
|
+
type: string
|
|
3028
|
+
minLength: 2
|
|
3029
|
+
maxLength: 120
|
|
3030
|
+
ScanCreateResult:
|
|
3031
|
+
type: object
|
|
3032
|
+
required: [id, status]
|
|
3033
|
+
properties:
|
|
3034
|
+
id:
|
|
3035
|
+
type: string
|
|
3036
|
+
status:
|
|
3037
|
+
type: string
|
|
3038
|
+
message:
|
|
3039
|
+
type: string
|
|
3040
|
+
ScanCompany:
|
|
3041
|
+
type: object
|
|
3042
|
+
required: [orgnr, name, org_form, industry, city, website]
|
|
3043
|
+
properties:
|
|
3044
|
+
orgnr:
|
|
3045
|
+
type: string
|
|
3046
|
+
name:
|
|
3047
|
+
type: string
|
|
3048
|
+
org_form:
|
|
3049
|
+
type: [string, "null"]
|
|
3050
|
+
industry:
|
|
3051
|
+
type: [string, "null"]
|
|
3052
|
+
city:
|
|
3053
|
+
type: [string, "null"]
|
|
3054
|
+
website:
|
|
3055
|
+
type: [string, "null"]
|
|
3056
|
+
ScanJob:
|
|
3057
|
+
type: object
|
|
3058
|
+
required: [id, status, input, resolved, result, error, created_at, finished_at]
|
|
3059
|
+
properties:
|
|
3060
|
+
id:
|
|
3061
|
+
type: string
|
|
3062
|
+
status:
|
|
3063
|
+
type: string
|
|
3064
|
+
description: pending | running | done | failed
|
|
3065
|
+
input:
|
|
3066
|
+
$ref: "#/components/schemas/ScanCreateInput"
|
|
3067
|
+
resolved:
|
|
3068
|
+
type: [object, "null"]
|
|
3069
|
+
properties:
|
|
3070
|
+
orgnr:
|
|
3071
|
+
type: string
|
|
3072
|
+
companyName:
|
|
3073
|
+
type: string
|
|
3074
|
+
websiteUrl:
|
|
3075
|
+
type: string
|
|
3076
|
+
result:
|
|
3077
|
+
type: [object, "null"]
|
|
3078
|
+
description: >-
|
|
3079
|
+
Versioned findings payload (see the SDK `ScanResultPayload` type);
|
|
3080
|
+
additive per `version`. The stable core is documented below;
|
|
3081
|
+
further sections (registry, signals, pagespeed, seo, ai, gdpr,
|
|
3082
|
+
mailAuth, httpsOk) evolve additively.
|
|
3083
|
+
required: [version, nettskaar, subScores]
|
|
3084
|
+
properties:
|
|
3085
|
+
version:
|
|
3086
|
+
type: integer
|
|
3087
|
+
nettskaar:
|
|
3088
|
+
type: [integer, "null"]
|
|
3089
|
+
description: Weighted composite score (0-100); null when unmeasurable.
|
|
3090
|
+
subScores:
|
|
3091
|
+
type: object
|
|
3092
|
+
description: Per-axis 0-100 scores; null axes were unmeasurable.
|
|
3093
|
+
required: [fart, google, ai, trygghet, omdomme]
|
|
3094
|
+
properties:
|
|
3095
|
+
fart: { type: [integer, "null"] }
|
|
3096
|
+
google: { type: [integer, "null"] }
|
|
3097
|
+
ai: { type: [integer, "null"] }
|
|
3098
|
+
trygghet: { type: [integer, "null"] }
|
|
3099
|
+
omdomme: { type: [integer, "null"] }
|
|
3100
|
+
additionalProperties: true
|
|
3101
|
+
error:
|
|
3102
|
+
type: [string, "null"]
|
|
3103
|
+
description: Public-safe failure code (company_not_found, no_website, …).
|
|
3104
|
+
created_at:
|
|
3105
|
+
type: [string, "null"]
|
|
3106
|
+
format: date-time
|
|
3107
|
+
finished_at:
|
|
3108
|
+
type: [string, "null"]
|
|
3109
|
+
format: date-time
|
|
3110
|
+
Envelope_ScanCreateResult:
|
|
3111
|
+
type: object
|
|
3112
|
+
required: [data]
|
|
3113
|
+
properties:
|
|
3114
|
+
data:
|
|
3115
|
+
$ref: "#/components/schemas/ScanCreateResult"
|
|
3116
|
+
Envelope_ScanCompanyArray:
|
|
3117
|
+
type: object
|
|
3118
|
+
required: [data]
|
|
3119
|
+
properties:
|
|
3120
|
+
data:
|
|
3121
|
+
type: array
|
|
3122
|
+
items:
|
|
3123
|
+
$ref: "#/components/schemas/ScanCompany"
|
|
3124
|
+
Envelope_ScanJob:
|
|
3125
|
+
type: object
|
|
3126
|
+
required: [data]
|
|
3127
|
+
properties:
|
|
3128
|
+
data:
|
|
3129
|
+
$ref: "#/components/schemas/ScanJob"
|
|
2562
3130
|
Envelope_GdprExportRequest:
|
|
2563
3131
|
type: object
|
|
2564
3132
|
required: [data]
|
|
@@ -2639,6 +3207,94 @@ components:
|
|
|
2639
3207
|
properties:
|
|
2640
3208
|
data:
|
|
2641
3209
|
$ref: "#/components/schemas/WebhookDeleteResult"
|
|
3210
|
+
IssueCapabilityConfirmationInput:
|
|
3211
|
+
type: object
|
|
3212
|
+
required: [capability_id, preview_summary, user_approved]
|
|
3213
|
+
properties:
|
|
3214
|
+
capability_id:
|
|
3215
|
+
type: string
|
|
3216
|
+
minLength: 1
|
|
3217
|
+
maxLength: 160
|
|
3218
|
+
description: Confirmable capability to mint a token for.
|
|
3219
|
+
api_path:
|
|
3220
|
+
type: string
|
|
3221
|
+
minLength: 1
|
|
3222
|
+
maxLength: 512
|
|
3223
|
+
description: >-
|
|
3224
|
+
Concrete `/api/v1/...` path to bind the token to. Optional when the
|
|
3225
|
+
capability has exactly one API target; required when it has several.
|
|
3226
|
+
path_params:
|
|
3227
|
+
type: object
|
|
3228
|
+
additionalProperties:
|
|
3229
|
+
type: [string, number, boolean]
|
|
3230
|
+
description: Values for the capability path template's parameters.
|
|
3231
|
+
idempotency_key:
|
|
3232
|
+
type: string
|
|
3233
|
+
minLength: 1
|
|
3234
|
+
description: >-
|
|
3235
|
+
The exact `Idempotency-Key` the confirmed write will send. The token
|
|
3236
|
+
is bound to it.
|
|
3237
|
+
preview_summary:
|
|
3238
|
+
type: string
|
|
3239
|
+
minLength: 1
|
|
3240
|
+
maxLength: 4000
|
|
3241
|
+
description: >-
|
|
3242
|
+
Human-readable description of the approved action, retained for
|
|
3243
|
+
audit.
|
|
3244
|
+
user_approved:
|
|
3245
|
+
const: true
|
|
3246
|
+
description: >-
|
|
3247
|
+
Asserts that a human on the caller's side approved this specific
|
|
3248
|
+
action.
|
|
3249
|
+
CapabilityConfirmation:
|
|
3250
|
+
type: object
|
|
3251
|
+
required:
|
|
3252
|
+
- confirmation_token
|
|
3253
|
+
- token_type
|
|
3254
|
+
- capability_id
|
|
3255
|
+
- method
|
|
3256
|
+
- path
|
|
3257
|
+
- required_scopes
|
|
3258
|
+
- idempotency_key
|
|
3259
|
+
- expires_in
|
|
3260
|
+
- expires_at
|
|
3261
|
+
- preview_summary
|
|
3262
|
+
properties:
|
|
3263
|
+
confirmation_token:
|
|
3264
|
+
type: string
|
|
3265
|
+
description: Send as the `X-Capability-Confirmation` header on the write.
|
|
3266
|
+
token_type:
|
|
3267
|
+
type: string
|
|
3268
|
+
const: medal_capability_confirmation
|
|
3269
|
+
capability_id:
|
|
3270
|
+
type: string
|
|
3271
|
+
method:
|
|
3272
|
+
type: string
|
|
3273
|
+
path:
|
|
3274
|
+
type: string
|
|
3275
|
+
required_scopes:
|
|
3276
|
+
type: array
|
|
3277
|
+
items:
|
|
3278
|
+
type: string
|
|
3279
|
+
idempotency_key:
|
|
3280
|
+
type: [string, "null"]
|
|
3281
|
+
expires_in:
|
|
3282
|
+
type: integer
|
|
3283
|
+
minimum: 60
|
|
3284
|
+
maximum: 900
|
|
3285
|
+
expires_at:
|
|
3286
|
+
type: string
|
|
3287
|
+
format: date-time
|
|
3288
|
+
preview_summary:
|
|
3289
|
+
type: string
|
|
3290
|
+
ApiResponse_CapabilityConfirmation:
|
|
3291
|
+
$ref: "#/components/schemas/Envelope_CapabilityConfirmation"
|
|
3292
|
+
Envelope_CapabilityConfirmation:
|
|
3293
|
+
type: object
|
|
3294
|
+
required: [data]
|
|
3295
|
+
properties:
|
|
3296
|
+
data:
|
|
3297
|
+
$ref: "#/components/schemas/CapabilityConfirmation"
|
|
2642
3298
|
Envelope_WebhookDeliveryArray:
|
|
2643
3299
|
type: object
|
|
2644
3300
|
required: [data]
|
|
@@ -2653,3 +3309,47 @@ components:
|
|
|
2653
3309
|
properties:
|
|
2654
3310
|
data:
|
|
2655
3311
|
$ref: "#/components/schemas/WebhookTestResult"
|
|
3312
|
+
Envelope_ConnectLinkCreateResult:
|
|
3313
|
+
type: object
|
|
3314
|
+
required: [data]
|
|
3315
|
+
properties:
|
|
3316
|
+
data:
|
|
3317
|
+
$ref: "#/components/schemas/ConnectLinkCreateResult"
|
|
3318
|
+
Envelope_ConnectLinkArray:
|
|
3319
|
+
type: object
|
|
3320
|
+
deprecated: true
|
|
3321
|
+
description: >-
|
|
3322
|
+
Deprecated — `listChannelConnectLinks` responds with
|
|
3323
|
+
`PaginatedResponse_ConnectLink`. Retained for backwards compatibility
|
|
3324
|
+
with consumers of the generated contract types.
|
|
3325
|
+
required: [data]
|
|
3326
|
+
properties:
|
|
3327
|
+
data:
|
|
3328
|
+
type: array
|
|
3329
|
+
items:
|
|
3330
|
+
$ref: "#/components/schemas/ConnectLink"
|
|
3331
|
+
Envelope_ConnectLinkRevokeResult:
|
|
3332
|
+
type: object
|
|
3333
|
+
required: [data]
|
|
3334
|
+
properties:
|
|
3335
|
+
data:
|
|
3336
|
+
$ref: "#/components/schemas/ConnectLinkRevokeResult"
|
|
3337
|
+
Envelope_ChannelConnectionArray:
|
|
3338
|
+
type: object
|
|
3339
|
+
deprecated: true
|
|
3340
|
+
description: >-
|
|
3341
|
+
Deprecated — `listChannelConnections` responds with
|
|
3342
|
+
`PaginatedResponse_ChannelConnection`. Retained for backwards
|
|
3343
|
+
compatibility with consumers of the generated contract types.
|
|
3344
|
+
required: [data]
|
|
3345
|
+
properties:
|
|
3346
|
+
data:
|
|
3347
|
+
type: array
|
|
3348
|
+
items:
|
|
3349
|
+
$ref: "#/components/schemas/ChannelConnection"
|
|
3350
|
+
Envelope_ChannelConnectionDisconnectResult:
|
|
3351
|
+
type: object
|
|
3352
|
+
required: [data]
|
|
3353
|
+
properties:
|
|
3354
|
+
data:
|
|
3355
|
+
$ref: "#/components/schemas/ChannelConnectionDisconnectResult"
|