@iblai/iblai-api 4.471.0-ai → 4.472.0-ai

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 (45) hide show
  1. package/dist/index.cjs.js +395 -3
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +396 -4
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +395 -3
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +15 -0
  8. package/dist/types/models/AgentChannel.d.ts +26 -0
  9. package/dist/types/models/AgentChannelCreate.d.ts +24 -0
  10. package/dist/types/models/AgentChannelTransportEnum.d.ts +8 -0
  11. package/dist/types/models/ChannelAllowEntry.d.ts +8 -0
  12. package/dist/types/models/ChannelAllowEntryCreate.d.ts +6 -0
  13. package/dist/types/models/ChannelAllowEntrySourceEnum.d.ts +10 -0
  14. package/dist/types/models/ChannelPairingRequest.d.ts +9 -0
  15. package/dist/types/models/ChannelPairingRequestStatusEnum.d.ts +12 -0
  16. package/dist/types/models/DmPolicyEnum.d.ts +10 -0
  17. package/dist/types/models/EffectiveDmPolicyEnum.d.ts +10 -0
  18. package/dist/types/models/PaginatedAgentChannels.d.ts +7 -0
  19. package/dist/types/models/PaginatedChannelAllowEntries.d.ts +7 -0
  20. package/dist/types/models/PaginatedChannelPairingRequests.d.ts +7 -0
  21. package/dist/types/models/PatchedAgentChannelUpdate.d.ts +26 -0
  22. package/dist/types/models/Transport755Enum.d.ts +6 -0
  23. package/dist/types/services/V1AgentsService.d.ts +191 -0
  24. package/dist/types/services/V1ChannelsService.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/sdk_schema.yml +887 -2
  27. package/src/core/OpenAPI.ts +1 -1
  28. package/src/index.ts +15 -0
  29. package/src/models/AgentChannel.ts +31 -0
  30. package/src/models/AgentChannelCreate.ts +29 -0
  31. package/src/models/AgentChannelTransportEnum.ts +12 -0
  32. package/src/models/ChannelAllowEntry.ts +13 -0
  33. package/src/models/ChannelAllowEntryCreate.ts +11 -0
  34. package/src/models/ChannelAllowEntrySourceEnum.ts +14 -0
  35. package/src/models/ChannelPairingRequest.ts +14 -0
  36. package/src/models/ChannelPairingRequestStatusEnum.ts +16 -0
  37. package/src/models/DmPolicyEnum.ts +14 -0
  38. package/src/models/EffectiveDmPolicyEnum.ts +14 -0
  39. package/src/models/PaginatedAgentChannels.ts +12 -0
  40. package/src/models/PaginatedChannelAllowEntries.ts +12 -0
  41. package/src/models/PaginatedChannelPairingRequests.ts +12 -0
  42. package/src/models/PatchedAgentChannelUpdate.ts +31 -0
  43. package/src/models/Transport755Enum.ts +10 -0
  44. package/src/services/V1AgentsService.ts +420 -0
  45. package/src/services/V1ChannelsService.ts +2 -1
package/dist/index.cjs.js CHANGED
@@ -110,7 +110,7 @@ class CancelablePromise {
110
110
 
111
111
  const OpenAPI = {
112
112
  BASE: 'https://base.manager.iblai.app',
113
- VERSION: '4.471.0-ai-plus',
113
+ VERSION: '4.472.0-ai-plus',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -192,6 +192,20 @@ exports.ActivityTypeEnum = void 0;
192
192
  ActivityTypeEnum["DEADLINE"] = "deadline";
193
193
  })(exports.ActivityTypeEnum || (exports.ActivityTypeEnum = {}));
194
194
 
195
+ /* generated using openapi-typescript-codegen -- do not edit */
196
+ /* istanbul ignore file */
197
+ /* tslint:disable */
198
+ /* eslint-disable */
199
+ /**
200
+ * * `native` - Native
201
+ * * `claw` - Agent sandbox
202
+ */
203
+ exports.AgentChannelTransportEnum = void 0;
204
+ (function (AgentChannelTransportEnum) {
205
+ AgentChannelTransportEnum["NATIVE"] = "native";
206
+ AgentChannelTransportEnum["CLAW"] = "claw";
207
+ })(exports.AgentChannelTransportEnum || (exports.AgentChannelTransportEnum = {}));
208
+
195
209
  /* generated using openapi-typescript-codegen -- do not edit */
196
210
  /* istanbul ignore file */
197
211
  /* tslint:disable */
@@ -329,6 +343,22 @@ exports.CeleryHeartbeatStatusEnum = void 0;
329
343
  CeleryHeartbeatStatusEnum["UNHEALTHY"] = "unhealthy";
330
344
  })(exports.CeleryHeartbeatStatusEnum || (exports.CeleryHeartbeatStatusEnum = {}));
331
345
 
346
+ /* generated using openapi-typescript-codegen -- do not edit */
347
+ /* istanbul ignore file */
348
+ /* tslint:disable */
349
+ /* eslint-disable */
350
+ /**
351
+ * * `pairing` - Pairing code
352
+ * * `admin` - Added by an admin
353
+ * * `auto_email` - Email auto-link
354
+ */
355
+ exports.ChannelAllowEntrySourceEnum = void 0;
356
+ (function (ChannelAllowEntrySourceEnum) {
357
+ ChannelAllowEntrySourceEnum["PAIRING"] = "pairing";
358
+ ChannelAllowEntrySourceEnum["ADMIN"] = "admin";
359
+ ChannelAllowEntrySourceEnum["AUTO_EMAIL"] = "auto_email";
360
+ })(exports.ChannelAllowEntrySourceEnum || (exports.ChannelAllowEntrySourceEnum = {}));
361
+
332
362
  /* generated using openapi-typescript-codegen -- do not edit */
333
363
  /* istanbul ignore file */
334
364
  /* tslint:disable */
@@ -353,6 +383,24 @@ exports.ChannelEnum = void 0;
353
383
  ChannelEnum["TELEGRAM"] = "telegram";
354
384
  })(exports.ChannelEnum || (exports.ChannelEnum = {}));
355
385
 
386
+ /* generated using openapi-typescript-codegen -- do not edit */
387
+ /* istanbul ignore file */
388
+ /* tslint:disable */
389
+ /* eslint-disable */
390
+ /**
391
+ * * `pending` - Pending
392
+ * * `redeemed` - Redeemed
393
+ * * `dismissed` - Dismissed
394
+ * * `expired` - Expired
395
+ */
396
+ exports.ChannelPairingRequestStatusEnum = void 0;
397
+ (function (ChannelPairingRequestStatusEnum) {
398
+ ChannelPairingRequestStatusEnum["PENDING"] = "pending";
399
+ ChannelPairingRequestStatusEnum["REDEEMED"] = "redeemed";
400
+ ChannelPairingRequestStatusEnum["DISMISSED"] = "dismissed";
401
+ ChannelPairingRequestStatusEnum["EXPIRED"] = "expired";
402
+ })(exports.ChannelPairingRequestStatusEnum || (exports.ChannelPairingRequestStatusEnum = {}));
403
+
356
404
  /* generated using openapi-typescript-codegen -- do not edit */
357
405
  /* istanbul ignore file */
358
406
  /* tslint:disable */
@@ -705,6 +753,38 @@ exports.DisclaimerScopeEnum = void 0;
705
753
  DisclaimerScopeEnum["MENTOR"] = "mentor";
706
754
  })(exports.DisclaimerScopeEnum || (exports.DisclaimerScopeEnum = {}));
707
755
 
756
+ /* generated using openapi-typescript-codegen -- do not edit */
757
+ /* istanbul ignore file */
758
+ /* tslint:disable */
759
+ /* eslint-disable */
760
+ /**
761
+ * * `pairing` - Anyone, after pairing
762
+ * * `allowlist` - Allowlisted senders only
763
+ * * `open` - Anyone (anonymous guests allowed)
764
+ */
765
+ exports.DmPolicyEnum = void 0;
766
+ (function (DmPolicyEnum) {
767
+ DmPolicyEnum["PAIRING"] = "pairing";
768
+ DmPolicyEnum["ALLOWLIST"] = "allowlist";
769
+ DmPolicyEnum["OPEN"] = "open";
770
+ })(exports.DmPolicyEnum || (exports.DmPolicyEnum = {}));
771
+
772
+ /* generated using openapi-typescript-codegen -- do not edit */
773
+ /* istanbul ignore file */
774
+ /* tslint:disable */
775
+ /* eslint-disable */
776
+ /**
777
+ * * `pairing` - Anyone, after pairing
778
+ * * `allowlist` - Allowlisted senders only
779
+ * * `open` - Anyone (anonymous guests allowed)
780
+ */
781
+ exports.EffectiveDmPolicyEnum = void 0;
782
+ (function (EffectiveDmPolicyEnum) {
783
+ EffectiveDmPolicyEnum["PAIRING"] = "pairing";
784
+ EffectiveDmPolicyEnum["ALLOWLIST"] = "allowlist";
785
+ EffectiveDmPolicyEnum["OPEN"] = "open";
786
+ })(exports.EffectiveDmPolicyEnum || (exports.EffectiveDmPolicyEnum = {}));
787
+
708
788
  /* generated using openapi-typescript-codegen -- do not edit */
709
789
  /* istanbul ignore file */
710
790
  /* tslint:disable */
@@ -3485,6 +3565,18 @@ exports.TransactionTypeEnum = void 0;
3485
3565
  TransactionTypeEnum["REFUND"] = "refund";
3486
3566
  })(exports.TransactionTypeEnum || (exports.TransactionTypeEnum = {}));
3487
3567
 
3568
+ /* generated using openapi-typescript-codegen -- do not edit */
3569
+ /* istanbul ignore file */
3570
+ /* tslint:disable */
3571
+ /* eslint-disable */
3572
+ /**
3573
+ * * `native` - native
3574
+ */
3575
+ exports.Transport755Enum = void 0;
3576
+ (function (Transport755Enum) {
3577
+ Transport755Enum["NATIVE"] = "native";
3578
+ })(exports.Transport755Enum || (exports.Transport755Enum = {}));
3579
+
3488
3580
  /* generated using openapi-typescript-codegen -- do not edit */
3489
3581
  /* istanbul ignore file */
3490
3582
  /* tslint:disable */
@@ -49783,6 +49875,305 @@ class SkillsService {
49783
49875
  }
49784
49876
 
49785
49877
  class V1AgentsService {
49878
+ /**
49879
+ * List an agent's channels
49880
+ * The channels the agent is connected to that the caller can read. Requires Ibl.Mentor/AgentChannels/list; the agent's owner holds it.
49881
+ * @returns PaginatedAgentChannels
49882
+ * @throws ApiError
49883
+ */
49884
+ static v1AgentsChannelsRetrieve({
49885
+ agentId,
49886
+ dateFilter,
49887
+ endDate,
49888
+ iblaiOrg,
49889
+ startDate
49890
+ }) {
49891
+ return request(OpenAPI, {
49892
+ method: 'GET',
49893
+ url: '/v1/agents/{agent_id}/channels',
49894
+ path: {
49895
+ 'agent_id': agentId
49896
+ },
49897
+ headers: {
49898
+ 'iblai-org': iblaiOrg
49899
+ },
49900
+ query: {
49901
+ 'date_filter': dateFilter,
49902
+ 'end_date': endDate,
49903
+ 'start_date': startDate
49904
+ },
49905
+ errors: {
49906
+ 404: `No such agent, or not listable`
49907
+ }
49908
+ });
49909
+ }
49910
+ /**
49911
+ * Connect an agent to a channel
49912
+ * Uses one of the platform's credentials for the channel. The caller must hold platform channel-routing access to attach the credential. The agent receives nothing until inbound delivery ships. Requires Ibl.Mentor/AgentChannels/action and Ibl.Mentor/AgentChannelRouting/action.
49913
+ * @returns AgentChannel
49914
+ * @throws ApiError
49915
+ */
49916
+ static v1AgentsChannelsCreate({
49917
+ agentId,
49918
+ requestBody,
49919
+ iblaiOrg
49920
+ }) {
49921
+ return request(OpenAPI, {
49922
+ method: 'POST',
49923
+ url: '/v1/agents/{agent_id}/channels',
49924
+ path: {
49925
+ 'agent_id': agentId
49926
+ },
49927
+ headers: {
49928
+ 'iblai-org': iblaiOrg
49929
+ },
49930
+ body: requestBody,
49931
+ mediaType: 'application/json',
49932
+ errors: {
49933
+ 400: `Invalid channel, credential, address or dm_policy`,
49934
+ 404: `No such agent, or not listable`
49935
+ }
49936
+ });
49937
+ }
49938
+ /**
49939
+ * Get an agent's channel
49940
+ * Requires Ibl.Mentor/AgentChannels/read.
49941
+ * @returns AgentChannel
49942
+ * @throws ApiError
49943
+ */
49944
+ static v1AgentsChannelsRetrieve2({
49945
+ agentId,
49946
+ channel,
49947
+ iblaiOrg
49948
+ }) {
49949
+ return request(OpenAPI, {
49950
+ method: 'GET',
49951
+ url: '/v1/agents/{agent_id}/channels/{channel}',
49952
+ path: {
49953
+ 'agent_id': agentId,
49954
+ 'channel': channel
49955
+ },
49956
+ headers: {
49957
+ 'iblai-org': iblaiOrg
49958
+ },
49959
+ errors: {
49960
+ 404: `No such agent or channel, or not readable`
49961
+ }
49962
+ });
49963
+ }
49964
+ /**
49965
+ * Update an agent's channel
49966
+ * Changes the credential, address, dm_policy or enabled. Changing the credential or routing address, enabling a disabled channel, or opening one to anonymous guests requires platform channel-routing access; a new credential must be of the same channel. The channel itself never changes. Requires Ibl.Mentor/AgentChannels/write.
49967
+ * @returns AgentChannel
49968
+ * @throws ApiError
49969
+ */
49970
+ static v1AgentsChannelsPartialUpdate({
49971
+ agentId,
49972
+ channel,
49973
+ iblaiOrg,
49974
+ requestBody
49975
+ }) {
49976
+ return request(OpenAPI, {
49977
+ method: 'PATCH',
49978
+ url: '/v1/agents/{agent_id}/channels/{channel}',
49979
+ path: {
49980
+ 'agent_id': agentId,
49981
+ 'channel': channel
49982
+ },
49983
+ headers: {
49984
+ 'iblai-org': iblaiOrg
49985
+ },
49986
+ body: requestBody,
49987
+ mediaType: 'application/json',
49988
+ errors: {
49989
+ 400: `Invalid credential, address or dm_policy`,
49990
+ 404: `No such agent or channel, or not readable`
49991
+ }
49992
+ });
49993
+ }
49994
+ /**
49995
+ * Disconnect an agent from a channel
49996
+ * Removes the channel with its allowlist, pairing requests and conversations. The credential stays. Requires Ibl.Mentor/AgentChannels/delete.
49997
+ * @returns void
49998
+ * @throws ApiError
49999
+ */
50000
+ static v1AgentsChannelsDestroy({
50001
+ agentId,
50002
+ channel,
50003
+ iblaiOrg
50004
+ }) {
50005
+ return request(OpenAPI, {
50006
+ method: 'DELETE',
50007
+ url: '/v1/agents/{agent_id}/channels/{channel}',
50008
+ path: {
50009
+ 'agent_id': agentId,
50010
+ 'channel': channel
50011
+ },
50012
+ headers: {
50013
+ 'iblai-org': iblaiOrg
50014
+ },
50015
+ errors: {
50016
+ 404: `No such agent or channel, or not readable`
50017
+ }
50018
+ });
50019
+ }
50020
+ /**
50021
+ * List an agent channel's allowlist
50022
+ * Newest first. Requires Ibl.Mentor/AgentChannelAccess/list.
50023
+ * @returns PaginatedChannelAllowEntries
50024
+ * @throws ApiError
50025
+ */
50026
+ static v1AgentsChannelsAllowEntriesRetrieve({
50027
+ agentId,
50028
+ channel,
50029
+ dateFilter,
50030
+ endDate,
50031
+ iblaiOrg,
50032
+ startDate
50033
+ }) {
50034
+ return request(OpenAPI, {
50035
+ method: 'GET',
50036
+ url: '/v1/agents/{agent_id}/channels/{channel}/allow-entries',
50037
+ path: {
50038
+ 'agent_id': agentId,
50039
+ 'channel': channel
50040
+ },
50041
+ headers: {
50042
+ 'iblai-org': iblaiOrg
50043
+ },
50044
+ query: {
50045
+ 'date_filter': dateFilter,
50046
+ 'end_date': endDate,
50047
+ 'start_date': startDate
50048
+ },
50049
+ errors: {
50050
+ 404: `No such agent or channel, or not readable`
50051
+ }
50052
+ });
50053
+ }
50054
+ /**
50055
+ * Allow a sender to reach an agent channel
50056
+ * The sender id is normalised to the form the channel's connector reads. Allowing a sender doesn't link them to a user: identity and RBAC still apply. Requires Ibl.Mentor/AgentChannelAccess/action.
50057
+ * @returns ChannelAllowEntry
50058
+ * @throws ApiError
50059
+ */
50060
+ static v1AgentsChannelsAllowEntriesCreate({
50061
+ agentId,
50062
+ channel,
50063
+ requestBody,
50064
+ iblaiOrg
50065
+ }) {
50066
+ return request(OpenAPI, {
50067
+ method: 'POST',
50068
+ url: '/v1/agents/{agent_id}/channels/{channel}/allow-entries',
50069
+ path: {
50070
+ 'agent_id': agentId,
50071
+ 'channel': channel
50072
+ },
50073
+ headers: {
50074
+ 'iblai-org': iblaiOrg
50075
+ },
50076
+ body: requestBody,
50077
+ mediaType: 'application/json',
50078
+ errors: {
50079
+ 400: `Invalid or already allowed sender`,
50080
+ 404: `No such agent or channel, or not readable`
50081
+ }
50082
+ });
50083
+ }
50084
+ /**
50085
+ * Remove a sender from an agent channel's allowlist
50086
+ * The sender's linked identity, if any, stays. Requires Ibl.Mentor/AgentChannelAccess/delete.
50087
+ * @returns void
50088
+ * @throws ApiError
50089
+ */
50090
+ static v1AgentsChannelsAllowEntriesDestroy({
50091
+ agentId,
50092
+ channel,
50093
+ entryId,
50094
+ iblaiOrg
50095
+ }) {
50096
+ return request(OpenAPI, {
50097
+ method: 'DELETE',
50098
+ url: '/v1/agents/{agent_id}/channels/{channel}/allow-entries/{entry_id}',
50099
+ path: {
50100
+ 'agent_id': agentId,
50101
+ 'channel': channel,
50102
+ 'entry_id': entryId
50103
+ },
50104
+ headers: {
50105
+ 'iblai-org': iblaiOrg
50106
+ },
50107
+ errors: {
50108
+ 404: `No such agent or channel, or not readable`
50109
+ }
50110
+ });
50111
+ }
50112
+ /**
50113
+ * List an agent channel's pairing requests
50114
+ * Pending ones by default; ?status= picks another. Codes are never returned: only the sender's user can redeem one. Requires Ibl.Mentor/AgentChannelAccess/list.
50115
+ * @returns PaginatedChannelPairingRequests
50116
+ * @throws ApiError
50117
+ */
50118
+ static v1AgentsChannelsPairingsRetrieve({
50119
+ agentId,
50120
+ channel,
50121
+ dateFilter,
50122
+ endDate,
50123
+ iblaiOrg,
50124
+ startDate,
50125
+ status = 'pending'
50126
+ }) {
50127
+ return request(OpenAPI, {
50128
+ method: 'GET',
50129
+ url: '/v1/agents/{agent_id}/channels/{channel}/pairings',
50130
+ path: {
50131
+ 'agent_id': agentId,
50132
+ 'channel': channel
50133
+ },
50134
+ headers: {
50135
+ 'iblai-org': iblaiOrg
50136
+ },
50137
+ query: {
50138
+ 'date_filter': dateFilter,
50139
+ 'end_date': endDate,
50140
+ 'start_date': startDate,
50141
+ 'status': status
50142
+ },
50143
+ errors: {
50144
+ 404: `No such agent or channel, or not readable`
50145
+ }
50146
+ });
50147
+ }
50148
+ /**
50149
+ * Dismiss a pairing request
50150
+ * Its code can no longer be redeemed. There is no approve: only the sender's user can link by redeeming the code. Requires Ibl.Mentor/AgentChannelAccess/delete.
50151
+ * @returns void
50152
+ * @throws ApiError
50153
+ */
50154
+ static v1AgentsChannelsPairingsDestroy({
50155
+ agentId,
50156
+ channel,
50157
+ pairingId,
50158
+ iblaiOrg
50159
+ }) {
50160
+ return request(OpenAPI, {
50161
+ method: 'DELETE',
50162
+ url: '/v1/agents/{agent_id}/channels/{channel}/pairings/{pairing_id}',
50163
+ path: {
50164
+ 'agent_id': agentId,
50165
+ 'channel': channel,
50166
+ 'pairing_id': pairingId
50167
+ },
50168
+ headers: {
50169
+ 'iblai-org': iblaiOrg
50170
+ },
50171
+ errors: {
50172
+ 404: `No such agent or channel, or not readable`,
50173
+ 409: `The request is no longer pending`
50174
+ }
50175
+ });
50176
+ }
49786
50177
  /**
49787
50178
  * Get agent settings field permissions
49788
50179
  * Which fields of the create-with-settings form the caller may set, as {field: {"write": bool}}. Create rejects a request that sends a field the caller may not write; omitted, it keeps the agent's default. Gated on create access like the create endpoints.
@@ -51639,7 +52030,7 @@ class V1ChannelsService {
51639
52030
  }
51640
52031
  /**
51641
52032
  * Delete a channel credential
51642
- * Requires Ibl.Mentor/ChannelCredentials/delete.
52033
+ * Refused with 409 while an agent channel uses the credential. Requires Ibl.Mentor/ChannelCredentials/delete.
51643
52034
  * @returns void
51644
52035
  * @throws ApiError
51645
52036
  */
@@ -51657,7 +52048,8 @@ class V1ChannelsService {
51657
52048
  'iblai-org': iblaiOrg
51658
52049
  },
51659
52050
  errors: {
51660
- 404: `No such credential on this platform, or not readable`
52051
+ 404: `No such credential on this platform, or not readable`,
52052
+ 409: `An agent channel uses the credential`
51661
52053
  }
51662
52054
  });
51663
52055
  }