@aws-amplify/data-schema 1.13.4 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/Authorization.js +12 -1
  2. package/dist/cjs/Authorization.js.map +1 -1
  3. package/dist/cjs/SchemaProcessor.js +2 -2
  4. package/dist/cjs/SchemaProcessor.js.map +1 -1
  5. package/dist/cjs/a.js +1 -0
  6. package/dist/cjs/a.js.map +1 -1
  7. package/dist/cjs/ai/ConversationSchemaGraphQLTypes.js +66 -66
  8. package/dist/cjs/ai/ConversationSchemaGraphQLTypes.js.map +1 -1
  9. package/dist/cjs/ai/ConversationSchemaProcessor.js +38 -8
  10. package/dist/cjs/ai/ConversationSchemaProcessor.js.map +1 -1
  11. package/dist/cjs/ai/ConversationType.js +62 -2
  12. package/dist/cjs/ai/ConversationType.js.map +1 -1
  13. package/dist/esm/Authorization.d.ts +7 -0
  14. package/dist/esm/Authorization.mjs +12 -1
  15. package/dist/esm/Authorization.mjs.map +1 -1
  16. package/dist/esm/SchemaProcessor.mjs +2 -2
  17. package/dist/esm/SchemaProcessor.mjs.map +1 -1
  18. package/dist/esm/a.d.ts +2 -1
  19. package/dist/esm/a.mjs +2 -0
  20. package/dist/esm/a.mjs.map +1 -1
  21. package/dist/esm/ai/ConversationSchemaGraphQLTypes.d.ts +1 -1
  22. package/dist/esm/ai/ConversationSchemaGraphQLTypes.mjs +66 -66
  23. package/dist/esm/ai/ConversationSchemaGraphQLTypes.mjs.map +1 -1
  24. package/dist/esm/ai/ConversationSchemaProcessor.d.ts +2 -2
  25. package/dist/esm/ai/ConversationSchemaProcessor.mjs +38 -8
  26. package/dist/esm/ai/ConversationSchemaProcessor.mjs.map +1 -1
  27. package/dist/esm/ai/ConversationType.d.ts +65 -7
  28. package/dist/esm/ai/ConversationType.mjs +61 -2
  29. package/dist/esm/ai/ConversationType.mjs.map +1 -1
  30. package/dist/meta/cjs.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/src/Authorization.ts +16 -0
  33. package/src/SchemaProcessor.ts +2 -2
  34. package/src/a.ts +2 -1
  35. package/src/ai/ConversationSchemaGraphQLTypes.ts +66 -66
  36. package/src/ai/ConversationSchemaProcessor.ts +62 -14
  37. package/src/ai/ConversationType.ts +96 -10
package/dist/cjs/a.js CHANGED
@@ -45,6 +45,7 @@ Object.defineProperty(exports, "conversation", { enumerable: true, get: function
45
45
  const ModelType_2 = require("./ai/ModelType");
46
46
  const ai = {
47
47
  model: ModelType_2.model,
48
+ dataTool: ConversationType_1.dataTool,
48
49
  };
49
50
  exports.ai = ai;
50
51
  //# sourceMappingURL=a.js.map
package/dist/cjs/a.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"a.js","sources":["../../src/a.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handler = exports.ai = exports.generation = exports.conversation = exports.ipAddress = exports.url = exports.phone = exports.json = exports.email = exports.timestamp = exports.datetime = exports.time = exports.date = exports.boolean = exports.float = exports.integer = exports.string = exports.id = exports.belongsTo = exports.hasMany = exports.hasOne = exports.subscription = exports.mutation = exports.query = exports.enum = exports.customType = exports.ref = exports.model = exports.combine = exports.schema = void 0;\nconst ModelSchema_1 = require(\"./ModelSchema\");\nObject.defineProperty(exports, \"schema\", { enumerable: true, get: function () { return ModelSchema_1.schema; } });\nconst CombineSchema_1 = require(\"./CombineSchema\");\nObject.defineProperty(exports, \"combine\", { enumerable: true, get: function () { return CombineSchema_1.combine; } });\nconst ModelType_1 = require(\"./ModelType\");\nObject.defineProperty(exports, \"model\", { enumerable: true, get: function () { return ModelType_1.model; } });\nconst ModelField_1 = require(\"./ModelField\");\nObject.defineProperty(exports, \"id\", { enumerable: true, get: function () { return ModelField_1.id; } });\nObject.defineProperty(exports, \"string\", { enumerable: true, get: function () { return ModelField_1.string; } });\nObject.defineProperty(exports, \"integer\", { enumerable: true, get: function () { return ModelField_1.integer; } });\nObject.defineProperty(exports, \"float\", { enumerable: true, get: function () { return ModelField_1.float; } });\nObject.defineProperty(exports, \"boolean\", { enumerable: true, get: function () { return ModelField_1.boolean; } });\nObject.defineProperty(exports, \"date\", { enumerable: true, get: function () { return ModelField_1.date; } });\nObject.defineProperty(exports, \"time\", { enumerable: true, get: function () { return ModelField_1.time; } });\nObject.defineProperty(exports, \"datetime\", { enumerable: true, get: function () { return ModelField_1.datetime; } });\nObject.defineProperty(exports, \"timestamp\", { enumerable: true, get: function () { return ModelField_1.timestamp; } });\nObject.defineProperty(exports, \"email\", { enumerable: true, get: function () { return ModelField_1.email; } });\nObject.defineProperty(exports, \"json\", { enumerable: true, get: function () { return ModelField_1.json; } });\nObject.defineProperty(exports, \"phone\", { enumerable: true, get: function () { return ModelField_1.phone; } });\nObject.defineProperty(exports, \"url\", { enumerable: true, get: function () { return ModelField_1.url; } });\nObject.defineProperty(exports, \"ipAddress\", { enumerable: true, get: function () { return ModelField_1.ipAddress; } });\nconst RefType_1 = require(\"./RefType\");\nObject.defineProperty(exports, \"ref\", { enumerable: true, get: function () { return RefType_1.ref; } });\nconst ModelRelationshipField_1 = require(\"./ModelRelationshipField\");\nObject.defineProperty(exports, \"hasOne\", { enumerable: true, get: function () { return ModelRelationshipField_1.hasOne; } });\nObject.defineProperty(exports, \"hasMany\", { enumerable: true, get: function () { return ModelRelationshipField_1.hasMany; } });\nObject.defineProperty(exports, \"belongsTo\", { enumerable: true, get: function () { return ModelRelationshipField_1.belongsTo; } });\nconst CustomType_1 = require(\"./CustomType\");\nObject.defineProperty(exports, \"customType\", { enumerable: true, get: function () { return CustomType_1.customType; } });\nconst EnumType_1 = require(\"./EnumType\");\nObject.defineProperty(exports, \"enum\", { enumerable: true, get: function () { return EnumType_1.enumType; } });\nconst CustomOperation_1 = require(\"./CustomOperation\");\nObject.defineProperty(exports, \"query\", { enumerable: true, get: function () { return CustomOperation_1.query; } });\nObject.defineProperty(exports, \"mutation\", { enumerable: true, get: function () { return CustomOperation_1.mutation; } });\nObject.defineProperty(exports, \"subscription\", { enumerable: true, get: function () { return CustomOperation_1.subscription; } });\nObject.defineProperty(exports, \"generation\", { enumerable: true, get: function () { return CustomOperation_1.generation; } });\nconst Handler_1 = require(\"./Handler\");\nObject.defineProperty(exports, \"handler\", { enumerable: true, get: function () { return Handler_1.handler; } });\nconst ConversationType_1 = require(\"./ai/ConversationType\");\nObject.defineProperty(exports, \"conversation\", { enumerable: true, get: function () { return ConversationType_1.conversation; } });\nconst ModelType_2 = require(\"./ai/ModelType\");\nconst ai = {\n model: ModelType_2.model,\n};\nexports.ai = ai;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK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E,CAAC,CAAC;AAC9H,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACvC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;AAChH,MAAM,kBAAkB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC5D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;AACnI,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC9C,MAAM,EAAE,GAAG;AACX,IAAI,KAAK,EAAE,WAAW,CAAC,KAAK;AAC5B,CAAC,CAAC;AACF,OAAO,CAAC,EAAE,GAAG,EAAE;;"}
1
+ {"version":3,"file":"a.js","sources":["../../src/a.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handler = exports.ai = exports.generation = exports.conversation = exports.ipAddress = exports.url = exports.phone = exports.json = exports.email = exports.timestamp = exports.datetime = exports.time = exports.date = exports.boolean = exports.float = exports.integer = exports.string = exports.id = exports.belongsTo = exports.hasMany = exports.hasOne = exports.subscription = exports.mutation = exports.query = exports.enum = exports.customType = exports.ref = exports.model = exports.combine = exports.schema = void 0;\nconst ModelSchema_1 = require(\"./ModelSchema\");\nObject.defineProperty(exports, \"schema\", { enumerable: true, get: function () { return ModelSchema_1.schema; } });\nconst CombineSchema_1 = require(\"./CombineSchema\");\nObject.defineProperty(exports, \"combine\", { enumerable: true, get: function () { return CombineSchema_1.combine; } });\nconst ModelType_1 = require(\"./ModelType\");\nObject.defineProperty(exports, \"model\", { enumerable: true, get: function () { return ModelType_1.model; } });\nconst ModelField_1 = require(\"./ModelField\");\nObject.defineProperty(exports, \"id\", { enumerable: true, get: function () { return ModelField_1.id; } });\nObject.defineProperty(exports, \"string\", { enumerable: true, get: function () { return ModelField_1.string; } });\nObject.defineProperty(exports, \"integer\", { enumerable: true, get: function () { return ModelField_1.integer; } });\nObject.defineProperty(exports, \"float\", { enumerable: true, get: function () { return ModelField_1.float; } });\nObject.defineProperty(exports, \"boolean\", { enumerable: true, get: function () { return ModelField_1.boolean; } });\nObject.defineProperty(exports, \"date\", { enumerable: true, get: function () { return ModelField_1.date; } });\nObject.defineProperty(exports, \"time\", { enumerable: true, get: function () { return ModelField_1.time; } });\nObject.defineProperty(exports, \"datetime\", { enumerable: true, get: function () { return ModelField_1.datetime; } });\nObject.defineProperty(exports, \"timestamp\", { enumerable: true, get: function () { return ModelField_1.timestamp; } });\nObject.defineProperty(exports, \"email\", { enumerable: true, get: function () { return ModelField_1.email; } });\nObject.defineProperty(exports, \"json\", { enumerable: true, get: function () { return ModelField_1.json; } });\nObject.defineProperty(exports, \"phone\", { enumerable: true, get: function () { return ModelField_1.phone; } });\nObject.defineProperty(exports, \"url\", { enumerable: true, get: function () { return ModelField_1.url; } });\nObject.defineProperty(exports, \"ipAddress\", { enumerable: true, get: function () { return ModelField_1.ipAddress; } });\nconst RefType_1 = require(\"./RefType\");\nObject.defineProperty(exports, \"ref\", { enumerable: true, get: function () { return RefType_1.ref; } });\nconst ModelRelationshipField_1 = require(\"./ModelRelationshipField\");\nObject.defineProperty(exports, \"hasOne\", { enumerable: true, get: function () { return ModelRelationshipField_1.hasOne; } });\nObject.defineProperty(exports, \"hasMany\", { enumerable: true, get: function () { return ModelRelationshipField_1.hasMany; } });\nObject.defineProperty(exports, \"belongsTo\", { enumerable: true, get: function () { return ModelRelationshipField_1.belongsTo; } });\nconst CustomType_1 = require(\"./CustomType\");\nObject.defineProperty(exports, \"customType\", { enumerable: true, get: function () { return CustomType_1.customType; } });\nconst EnumType_1 = require(\"./EnumType\");\nObject.defineProperty(exports, \"enum\", { enumerable: true, get: function () { return EnumType_1.enumType; } });\nconst CustomOperation_1 = require(\"./CustomOperation\");\nObject.defineProperty(exports, \"query\", { enumerable: true, get: function () { return CustomOperation_1.query; } });\nObject.defineProperty(exports, \"mutation\", { enumerable: true, get: function () { return CustomOperation_1.mutation; } });\nObject.defineProperty(exports, \"subscription\", { enumerable: true, get: function () { return CustomOperation_1.subscription; } });\nObject.defineProperty(exports, \"generation\", { enumerable: true, get: function () { return CustomOperation_1.generation; } });\nconst Handler_1 = require(\"./Handler\");\nObject.defineProperty(exports, \"handler\", { enumerable: true, get: function () { return Handler_1.handler; } });\nconst ConversationType_1 = require(\"./ai/ConversationType\");\nObject.defineProperty(exports, \"conversation\", { enumerable: true, get: function () { return ConversationType_1.conversation; } });\nconst ModelType_2 = require(\"./ai/ModelType\");\nconst ai = {\n model: ModelType_2.model,\n dataTool: ConversationType_1.dataTool,\n};\nexports.ai = ai;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG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BAAiB,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;AAClI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,iBAAiB,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9H,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACvC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;AAChH,MAAM,kBAAkB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC5D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;AACnI,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC9C,MAAM,EAAE,GAAG;AACX,IAAI,KAAK,EAAE,WAAW,CAAC,KAAK;AAC5B,IAAI,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;AACzC,CAAC,CAAC;AACF,OAAO,CAAC,EAAE,GAAG,EAAE;;"}
@@ -3,173 +3,173 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.CONVERSATION_SCHEMA_GRAPHQL_TYPES = void 0;
5
5
  exports.CONVERSATION_SCHEMA_GRAPHQL_TYPES =
6
- /* GraphQL */ `enum ConversationParticipantRole {
6
+ /* GraphQL */ `enum AmplifyAIConversationParticipantRole {
7
7
  user
8
8
  assistant
9
9
  }
10
10
 
11
- interface ConversationMessage {
11
+ interface AmplifyAIConversationMessage {
12
12
  id: ID!
13
13
  conversationId: ID!
14
14
  associatedUserMessageId: ID
15
- role: ConversationParticipantRole
16
- content: [ContentBlock]
15
+ role: AmplifyAIConversationParticipantRole
16
+ content: [AmplifyAIContentBlock]
17
17
  aiContext: AWSJSON
18
- toolConfiguration: ToolConfiguration
18
+ toolConfiguration: AmplifyAIToolConfiguration
19
19
  createdAt: AWSDateTime
20
20
  updatedAt: AWSDateTime
21
21
  owner: String
22
22
  }
23
23
 
24
- input DocumentBlockSourceInput {
24
+ input AmplifyAIDocumentBlockSourceInput {
25
25
  bytes: String
26
26
  }
27
27
 
28
- input DocumentBlockInput {
28
+ input AmplifyAIDocumentBlockInput {
29
29
  format: String!
30
30
  name: String!
31
- source: DocumentBlockSourceInput!
31
+ source: AmplifyAIDocumentBlockSourceInput!
32
32
  }
33
33
 
34
- input ImageBlockSourceInput {
34
+ input AmplifyAIImageBlockSourceInput {
35
35
  bytes: String
36
36
  }
37
37
 
38
- input ImageBlockInput {
38
+ input AmplifyAIImageBlockInput {
39
39
  format: String!
40
- source: ImageBlockSourceInput!
40
+ source: AmplifyAIImageBlockSourceInput!
41
41
  }
42
42
 
43
- input ToolUseBlockInput {
43
+ input AmplifyAIToolUseBlockInput {
44
44
  toolUseId: String!
45
45
  name: String!
46
46
  input: AWSJSON!
47
47
  }
48
48
 
49
- input ToolResultContentBlockInput {
50
- document: DocumentBlockInput
51
- image: ImageBlockInput
49
+ input AmplifyAIToolResultContentBlockInput {
50
+ document: AmplifyAIDocumentBlockInput
51
+ image: AmplifyAIImageBlockInput
52
52
  json: AWSJSON
53
53
  text: String
54
54
  }
55
55
 
56
- input ToolResultBlockInput {
57
- content: [ToolResultContentBlockInput!]!
56
+ input AmplifyAIToolResultBlockInput {
57
+ content: [AmplifyAIToolResultContentBlockInput!]!
58
58
  toolUseId: String!
59
59
  status: String
60
60
  }
61
61
 
62
- type DocumentBlockSource {
62
+ type AmplifyAIDocumentBlockSource {
63
63
  bytes: String
64
64
  }
65
65
 
66
- type DocumentBlock {
66
+ type AmplifyAIDocumentBlock {
67
67
  format: String!
68
68
  name: String!
69
- source: DocumentBlockSource!
69
+ source: AmplifyAIDocumentBlockSource!
70
70
  }
71
71
 
72
- type ImageBlock {
72
+ type AmplifyAIImageBlock {
73
73
  format: String!
74
- source: ImageBlockSource!
74
+ source: AmplifyAIImageBlockSource!
75
75
  }
76
76
 
77
- type ImageBlockSource {
77
+ type AmplifyAIImageBlockSource {
78
78
  bytes: String
79
79
  }
80
80
 
81
- type ToolUseBlock {
81
+ type AmplifyAIToolUseBlock {
82
82
  toolUseId: String!
83
83
  name: String!
84
84
  input: AWSJSON!
85
85
  }
86
86
 
87
- type ToolResultContentBlock {
88
- document: DocumentBlock
89
- image: ImageBlock
87
+ type AmplifyAIToolResultContentBlock {
88
+ document: AmplifyAIDocumentBlock
89
+ image: AmplifyAIImageBlock
90
90
  json: AWSJSON
91
91
  text: String
92
92
  }
93
93
 
94
- type ToolResultBlock {
95
- content: [ToolResultContentBlock!]!
94
+ type AmplifyAIToolResultBlock {
95
+ content: [AmplifyAIToolResultContentBlock!]!
96
96
  toolUseId: String!
97
97
  status: String
98
98
  }
99
99
 
100
- type ContentBlockText {
100
+ type AmplifyAIContentBlockText {
101
101
  text: String
102
102
  }
103
103
 
104
- type ContentBlockImage {
105
- image: ImageBlock
104
+ type AmplifyAIContentBlockImage {
105
+ image: AmplifyAIImageBlock
106
106
  }
107
107
 
108
- type ContentBlockDocument {
109
- document: DocumentBlock
108
+ type AmplifyAIContentBlockDocument {
109
+ document: AmplifyAIDocumentBlock
110
110
  }
111
111
 
112
- type ContentBlockToolUse {
113
- toolUse: ToolUseBlock
112
+ type AmplifyAIContentBlockToolUse {
113
+ toolUse: AmplifyAIToolUseBlock
114
114
  }
115
115
 
116
- type ContentBlockToolResult {
117
- toolResult: ToolResultBlock
116
+ type AmplifyAIContentBlockToolResult {
117
+ toolResult: AmplifyAIToolResultBlock
118
118
  }
119
119
 
120
- input ContentBlockInput {
120
+ input AmplifyAIContentBlockInput {
121
121
  text: String
122
- document: DocumentBlockInput
123
- image: ImageBlockInput
124
- toolResult: ToolResultBlockInput
125
- toolUse: ToolUseBlockInput
122
+ document: AmplifyAIDocumentBlockInput
123
+ image: AmplifyAIImageBlockInput
124
+ toolResult: AmplifyAIToolResultBlockInput
125
+ toolUse: AmplifyAIToolUseBlockInput
126
126
  }
127
127
 
128
- type ContentBlock {
128
+ type AmplifyAIContentBlock {
129
129
  text: String
130
- document: DocumentBlock
131
- image: ImageBlock
132
- toolResult: ToolResultBlock
133
- toolUse: ToolUseBlock
130
+ document: AmplifyAIDocumentBlock
131
+ image: AmplifyAIImageBlock
132
+ toolResult: AmplifyAIToolResultBlock
133
+ toolUse: AmplifyAIToolUseBlock
134
134
  }
135
135
 
136
- input ToolConfigurationInput {
137
- tools: [ToolInput]
136
+ input AmplifyAIToolConfigurationInput {
137
+ tools: [AmplifyAIToolInput]
138
138
  }
139
139
 
140
- input ToolInput {
141
- toolSpec: ToolSpecificationInput
140
+ input AmplifyAIToolInput {
141
+ toolSpec: AmplifyAIToolSpecificationInput
142
142
  }
143
143
 
144
- input ToolSpecificationInput {
144
+ input AmplifyAIToolSpecificationInput {
145
145
  name: String!
146
146
  description: String
147
- inputSchema: ToolInputSchemaInput!
147
+ inputSchema: AmplifyAIToolInputSchemaInput!
148
148
  }
149
149
 
150
- input ToolInputSchemaInput {
150
+ input AmplifyAIToolInputSchemaInput {
151
151
  json: AWSJSON
152
152
  }
153
153
 
154
- type ToolConfiguration {
155
- tools: [Tool]
154
+ type AmplifyAIToolConfiguration {
155
+ tools: [AmplifyAITool]
156
156
  }
157
157
 
158
- type Tool {
159
- toolSpec: ToolSpecification
158
+ type AmplifyAITool {
159
+ toolSpec: AmplifyAIToolSpecification
160
160
  }
161
161
 
162
- type ToolSpecification {
162
+ type AmplifyAIToolSpecification {
163
163
  name: String!
164
164
  description: String
165
- inputSchema: ToolInputSchema!
165
+ inputSchema: AmplifyAIToolInputSchema!
166
166
  }
167
167
 
168
- type ToolInputSchema {
168
+ type AmplifyAIToolInputSchema {
169
169
  json: AWSJSON
170
170
  }
171
171
 
172
- type ConversationMessageStreamPart @aws_cognito_user_pools {
172
+ type AmplifyAIConversationMessageStreamPart @aws_cognito_user_pools {
173
173
  id: ID!
174
174
  owner: String
175
175
  conversationId: ID!
@@ -177,13 +177,13 @@ type ConversationMessageStreamPart @aws_cognito_user_pools {
177
177
  contentBlockIndex: Int
178
178
  contentBlockText: String
179
179
  contentBlockDeltaIndex: Int
180
- contentBlockToolUse: ToolUseBlock
180
+ contentBlockToolUse: AmplifyAIToolUseBlock
181
181
  contentBlockDoneAtIndex: Int
182
182
  stopReason: String
183
- errors: [ConversationTurnError]
183
+ errors: [AmplifyAIConversationTurnError]
184
184
  }
185
185
 
186
- type ConversationTurnError @aws_cognito_user_pools {
186
+ type AmplifyAIConversationTurnError @aws_cognito_user_pools {
187
187
  message: String!
188
188
  errorType: String!
189
189
  }`;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationSchemaGraphQLTypes.js","sources":["../../../src/ai/ConversationSchemaGraphQLTypes.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CONVERSATION_SCHEMA_GRAPHQL_TYPES = void 0;\nexports.CONVERSATION_SCHEMA_GRAPHQL_TYPES = \n/* GraphQL */ `enum ConversationParticipantRole {\n user\n assistant\n}\n\ninterface ConversationMessage {\n id: ID!\n conversationId: ID!\n associatedUserMessageId: ID\n role: ConversationParticipantRole\n content: [ContentBlock]\n aiContext: AWSJSON\n toolConfiguration: ToolConfiguration\n createdAt: AWSDateTime\n updatedAt: AWSDateTime\n owner: String\n}\n\ninput DocumentBlockSourceInput {\n bytes: String\n}\n\ninput DocumentBlockInput {\n format: String!\n name: String!\n source: DocumentBlockSourceInput!\n}\n\ninput ImageBlockSourceInput {\n bytes: String\n}\n\ninput ImageBlockInput {\n format: String!\n source: ImageBlockSourceInput!\n}\n\ninput ToolUseBlockInput {\n toolUseId: String!\n name: String!\n input: AWSJSON!\n}\n\ninput ToolResultContentBlockInput {\n document: DocumentBlockInput\n image: ImageBlockInput\n json: AWSJSON\n text: String\n}\n\ninput ToolResultBlockInput {\n content: [ToolResultContentBlockInput!]!\n toolUseId: String!\n status: String\n}\n\ntype DocumentBlockSource {\n bytes: String\n}\n\ntype DocumentBlock {\n format: String!\n name: String!\n source: DocumentBlockSource!\n}\n\ntype ImageBlock {\n format: String!\n source: ImageBlockSource!\n}\n\ntype ImageBlockSource {\n bytes: String\n}\n\ntype ToolUseBlock {\n toolUseId: String!\n name: String!\n input: AWSJSON!\n}\n\ntype ToolResultContentBlock {\n document: DocumentBlock\n image: ImageBlock\n json: AWSJSON\n text: String\n}\n\ntype ToolResultBlock {\n content: [ToolResultContentBlock!]!\n toolUseId: String!\n status: String\n}\n\ntype ContentBlockText {\n text: String\n}\n\ntype ContentBlockImage {\n image: ImageBlock\n}\n\ntype ContentBlockDocument {\n document: DocumentBlock\n}\n\ntype ContentBlockToolUse {\n toolUse: ToolUseBlock\n}\n\ntype ContentBlockToolResult {\n toolResult: ToolResultBlock\n}\n\ninput ContentBlockInput {\n text: String\n document: DocumentBlockInput\n image: ImageBlockInput\n toolResult: ToolResultBlockInput\n toolUse: ToolUseBlockInput\n}\n\ntype ContentBlock {\n text: String\n document: DocumentBlock\n image: ImageBlock\n toolResult: ToolResultBlock\n toolUse: ToolUseBlock\n}\n\ninput ToolConfigurationInput {\n tools: [ToolInput]\n}\n\ninput ToolInput {\n toolSpec: ToolSpecificationInput\n}\n\ninput ToolSpecificationInput {\n name: String!\n description: String\n inputSchema: ToolInputSchemaInput!\n}\n\ninput ToolInputSchemaInput {\n json: AWSJSON\n}\n\ntype ToolConfiguration {\n tools: [Tool]\n}\n\ntype Tool {\n toolSpec: ToolSpecification\n}\n\ntype ToolSpecification {\n name: String!\n description: String\n inputSchema: ToolInputSchema!\n}\n\ntype ToolInputSchema {\n json: AWSJSON\n}\n\ntype ConversationMessageStreamPart @aws_cognito_user_pools {\n id: ID!\n owner: String\n conversationId: ID!\n associatedUserMessageId: ID!\n contentBlockIndex: Int\n contentBlockText: String\n contentBlockDeltaIndex: Int\n contentBlockToolUse: ToolUseBlock\n contentBlockDoneAtIndex: Int\n stopReason: String\n errors: [ConversationTurnError]\n}\n\ntype ConversationTurnError @aws_cognito_user_pools {\n message: String!\n errorType: String!\n}`;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iCAAiC,GAAG,KAAK,CAAC,CAAC;AACnD,OAAO,CAAC,iCAAiC;AACzC,cAAc,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;;"}
1
+ {"version":3,"file":"ConversationSchemaGraphQLTypes.js","sources":["../../../src/ai/ConversationSchemaGraphQLTypes.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CONVERSATION_SCHEMA_GRAPHQL_TYPES = void 0;\nexports.CONVERSATION_SCHEMA_GRAPHQL_TYPES = \n/* GraphQL */ `enum AmplifyAIConversationParticipantRole {\n user\n assistant\n}\n\ninterface AmplifyAIConversationMessage {\n id: ID!\n conversationId: ID!\n associatedUserMessageId: ID\n role: AmplifyAIConversationParticipantRole\n content: [AmplifyAIContentBlock]\n aiContext: AWSJSON\n toolConfiguration: AmplifyAIToolConfiguration\n createdAt: AWSDateTime\n updatedAt: AWSDateTime\n owner: String\n}\n\ninput AmplifyAIDocumentBlockSourceInput {\n bytes: String\n}\n\ninput AmplifyAIDocumentBlockInput {\n format: String!\n name: String!\n source: AmplifyAIDocumentBlockSourceInput!\n}\n\ninput AmplifyAIImageBlockSourceInput {\n bytes: String\n}\n\ninput AmplifyAIImageBlockInput {\n format: String!\n source: AmplifyAIImageBlockSourceInput!\n}\n\ninput AmplifyAIToolUseBlockInput {\n toolUseId: String!\n name: String!\n input: AWSJSON!\n}\n\ninput AmplifyAIToolResultContentBlockInput {\n document: AmplifyAIDocumentBlockInput\n image: AmplifyAIImageBlockInput\n json: AWSJSON\n text: String\n}\n\ninput AmplifyAIToolResultBlockInput {\n content: [AmplifyAIToolResultContentBlockInput!]!\n toolUseId: String!\n status: String\n}\n\ntype AmplifyAIDocumentBlockSource {\n bytes: String\n}\n\ntype AmplifyAIDocumentBlock {\n format: String!\n name: String!\n source: AmplifyAIDocumentBlockSource!\n}\n\ntype AmplifyAIImageBlock {\n format: String!\n source: AmplifyAIImageBlockSource!\n}\n\ntype AmplifyAIImageBlockSource {\n bytes: String\n}\n\ntype AmplifyAIToolUseBlock {\n toolUseId: String!\n name: String!\n input: AWSJSON!\n}\n\ntype AmplifyAIToolResultContentBlock {\n document: AmplifyAIDocumentBlock\n image: AmplifyAIImageBlock\n json: AWSJSON\n text: String\n}\n\ntype AmplifyAIToolResultBlock {\n content: [AmplifyAIToolResultContentBlock!]!\n toolUseId: String!\n status: String\n}\n\ntype AmplifyAIContentBlockText {\n text: String\n}\n\ntype AmplifyAIContentBlockImage {\n image: AmplifyAIImageBlock\n}\n\ntype AmplifyAIContentBlockDocument {\n document: AmplifyAIDocumentBlock\n}\n\ntype AmplifyAIContentBlockToolUse {\n toolUse: AmplifyAIToolUseBlock\n}\n\ntype AmplifyAIContentBlockToolResult {\n toolResult: AmplifyAIToolResultBlock\n}\n\ninput AmplifyAIContentBlockInput {\n text: String\n document: AmplifyAIDocumentBlockInput\n image: AmplifyAIImageBlockInput\n toolResult: AmplifyAIToolResultBlockInput\n toolUse: AmplifyAIToolUseBlockInput\n}\n\ntype AmplifyAIContentBlock {\n text: String\n document: AmplifyAIDocumentBlock\n image: AmplifyAIImageBlock\n toolResult: AmplifyAIToolResultBlock\n toolUse: AmplifyAIToolUseBlock\n}\n\ninput AmplifyAIToolConfigurationInput {\n tools: [AmplifyAIToolInput]\n}\n\ninput AmplifyAIToolInput {\n toolSpec: AmplifyAIToolSpecificationInput\n}\n\ninput AmplifyAIToolSpecificationInput {\n name: String!\n description: String\n inputSchema: AmplifyAIToolInputSchemaInput!\n}\n\ninput AmplifyAIToolInputSchemaInput {\n json: AWSJSON\n}\n\ntype AmplifyAIToolConfiguration {\n tools: [AmplifyAITool]\n}\n\ntype AmplifyAITool {\n toolSpec: AmplifyAIToolSpecification\n}\n\ntype AmplifyAIToolSpecification {\n name: String!\n description: String\n inputSchema: AmplifyAIToolInputSchema!\n}\n\ntype AmplifyAIToolInputSchema {\n json: AWSJSON\n}\n\ntype AmplifyAIConversationMessageStreamPart @aws_cognito_user_pools {\n id: ID!\n owner: String\n conversationId: ID!\n associatedUserMessageId: ID!\n contentBlockIndex: Int\n contentBlockText: String\n contentBlockDeltaIndex: Int\n contentBlockToolUse: AmplifyAIToolUseBlock\n contentBlockDoneAtIndex: Int\n stopReason: String\n errors: [AmplifyAIConversationTurnError]\n}\n\ntype AmplifyAIConversationTurnError @aws_cognito_user_pools {\n message: String!\n errorType: String!\n}`;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iCAAiC,GAAG,KAAK,CAAC,CAAC;AACnD,OAAO,CAAC,iCAAiC;AACzC,cAAc,CAAC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;;"}
@@ -2,9 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.createConversationField = void 0;
5
+ const Authorization_1 = require("../Authorization");
5
6
  const utils_1 = require("../runtime/utils");
6
7
  const createConversationField = (typeDef, typeName) => {
7
8
  const { aiModel, systemPrompt, handler, tools } = typeDef;
9
+ const { strategy, provider } = extractAuthorization(typeDef, typeName);
8
10
  const args = {
9
11
  aiModel: aiModel.resourcePath,
10
12
  // This is done to escape newlines in potentially multi-line system prompts
@@ -21,6 +23,7 @@ const createConversationField = (typeDef, typeName) => {
21
23
  const argsString = Object.entries(args)
22
24
  .map(([key, value]) => `${key}: "${value}"`)
23
25
  .join(', ');
26
+ const authString = `, auth: { strategy: ${strategy}, provider: ${provider} }`;
24
27
  const functionHandler = {};
25
28
  let handlerString = '';
26
29
  if (handler) {
@@ -32,21 +35,48 @@ const createConversationField = (typeDef, typeName) => {
32
35
  const toolsString = tools?.length
33
36
  ? `, tools: [${getConversationToolsString(tools)}]`
34
37
  : '';
35
- const conversationDirective = `@conversation(${argsString}${handlerString}${toolsString})`;
36
- const field = `${typeName}(conversationId: ID!, content: [ContentBlockInput], aiContext: AWSJSON, toolConfiguration: ToolConfigurationInput): ConversationMessage ${conversationDirective} @aws_cognito_user_pools`;
38
+ const conversationDirective = `@conversation(${argsString}${authString}${handlerString}${toolsString})`;
39
+ const field = `${typeName}(conversationId: ID!, content: [AmplifyAIContentBlockInput], aiContext: AWSJSON, toolConfiguration: AmplifyAIToolConfigurationInput): AmplifyAIConversationMessage ${conversationDirective} @aws_cognito_user_pools`;
37
40
  return { field, functionHandler };
38
41
  };
39
42
  exports.createConversationField = createConversationField;
40
43
  const isRef = (query) => query?.data?.type === 'ref';
44
+ const extractAuthorization = (typeDef, typeName) => {
45
+ const { authorization } = typeDef.data;
46
+ if (authorization.length === 0) {
47
+ throw new Error(`Conversation ${typeName} is missing authorization rules. Use .authorization((allow) => allow.owner()) to configure authorization for your conversation route.`);
48
+ }
49
+ const { strategy, provider } = (0, Authorization_1.accessData)(authorization[0]);
50
+ if (strategy !== 'owner' || provider !== 'userPools') {
51
+ throw new Error(`Conversation ${typeName} must use owner authorization with a user pool provider. Use .authorization((allow) => allow.owner()) to configure authorization for your conversation route.`);
52
+ }
53
+ return { strategy, provider };
54
+ };
41
55
  const getConversationToolsString = (tools) => tools
42
56
  .map((tool) => {
43
- const { query, description } = tool;
44
- if (!isRef(query)) {
45
- throw new Error(`Unexpected query was found in tool ${tool}.`);
57
+ const { name, description } = tool;
58
+ // https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolSpecification.html
59
+ // Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
60
+ // Length Constraints: Minimum length of 1. Maximum length of 64.
61
+ const isValidToolName = /^[a-zA-Z][a-zA-Z0-9_]*$/.test(name) &&
62
+ name.length >= 1 &&
63
+ name.length <= 64;
64
+ if (!isValidToolName) {
65
+ throw new Error(`Tool name must be between 1 and 64 characters, start with a letter, and contain only letters, numbers, and underscores. Found: ${name}`);
46
66
  }
47
- // TODO: add validation for query / auth (cup) / etc
48
- const queryName = query.data.link;
49
- return `{ name: "${queryName}", description: "${description}" }`;
67
+ const toolDefinition = extractToolDefinition(tool);
68
+ return `{ name: "${name}", description: "${description}", ${toolDefinition} }`;
50
69
  })
51
70
  .join(', ');
71
+ const extractToolDefinition = (tool) => {
72
+ if ('model' in tool) {
73
+ if (!isRef(tool.model))
74
+ throw new Error(`Unexpected model was found in tool ${tool}.`);
75
+ const { model, modelOperation } = tool;
76
+ return `modelName: "${model.data.link}", modelOperation: ${modelOperation}`;
77
+ }
78
+ if (!isRef(tool.query))
79
+ throw new Error(`Unexpected query was found in tool ${tool}.`);
80
+ return `queryName: "${tool.query.data.link}"`;
81
+ };
52
82
  //# sourceMappingURL=ConversationSchemaProcessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationSchemaProcessor.js","sources":["../../../src/ai/ConversationSchemaProcessor.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConversationField = void 0;\nconst utils_1 = require(\"../runtime/utils\");\nconst createConversationField = (typeDef, typeName) => {\n const { aiModel, systemPrompt, handler, tools } = typeDef;\n const args = {\n aiModel: aiModel.resourcePath,\n // This is done to escape newlines in potentially multi-line system prompts\n // e.g.\n // realtorChat: a.conversation({\n // aiModel: a.ai.model('Claude 3 Haiku'),\n // systemPrompt: `You are a helpful real estate assistant\n // Respond in the poetic form of haiku.`,\n // }),\n //\n // It doesn't affect non multi-line string inputs for system prompts\n systemPrompt: systemPrompt.replace(/\\r?\\n/g, '\\\\n'),\n };\n const argsString = Object.entries(args)\n .map(([key, value]) => `${key}: \"${value}\"`)\n .join(', ');\n const functionHandler = {};\n let handlerString = '';\n if (handler) {\n const functionName = `Fn${(0, utils_1.capitalize)(typeName)}`;\n const eventVersion = handler.eventVersion;\n handlerString = `, handler: { functionName: \"${functionName}\", eventVersion: \"${eventVersion}\" }`;\n functionHandler[functionName] = handler;\n }\n const toolsString = tools?.length\n ? `, tools: [${getConversationToolsString(tools)}]`\n : '';\n const conversationDirective = `@conversation(${argsString}${handlerString}${toolsString})`;\n const field = `${typeName}(conversationId: ID!, content: [ContentBlockInput], aiContext: AWSJSON, toolConfiguration: ToolConfigurationInput): ConversationMessage ${conversationDirective} @aws_cognito_user_pools`;\n return { field, functionHandler };\n};\nexports.createConversationField = createConversationField;\nconst isRef = (query) => query?.data?.type === 'ref';\nconst getConversationToolsString = (tools) => tools\n .map((tool) => {\n const { query, description } = tool;\n if (!isRef(query)) {\n throw new Error(`Unexpected query was found in tool ${tool}.`);\n }\n // TODO: add validation for query / auth (cup) / etc\n const queryName = query.data.link;\n return `{ name: \"${queryName}\", description: \"${description}\" }`;\n})\n .join(', ');\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO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AI,MAAM,WAAW,GAAG,KAAK,EAAE,MAAM;AACrC,UAAU,CAAC,UAAU,EAAE,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC3D,UAAU,EAAE,CAAC;AACb,IAAI,MAAM,qBAAqB,GAAG,CAAC,cAAc,EAAE,UAAU,CAAC,EAAE,aAAa,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AAC/F,IAAI,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,CAAC,wIAAwI,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;AACxN,IAAI,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AACtC,CAAC,CAAC;AACF,OAAO,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;AAC1D,MAAM,KAAK,GAAG,CAAC,KAAK,KAAK,KAAK,EAAE,IAAI,EAAE,IAAI,KAAK,KAAK,CAAC;AACrD,MAAM,0BAA0B,GAAG,CAAC,KAAK,KAAK,KAAK;AACnD,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK;AACnB,IAAI,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;AACxC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,mCAAmC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,KAAK;AACL;AACA,IAAI,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACtC,IAAI,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,iBAAiB,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;AACrE,CAAC,CAAC;AACF,KAAK,IAAI,CAAC,IAAI,CAAC;;"}
1
+ {"version":3,"file":"ConversationSchemaProcessor.js","sources":["../../../src/ai/ConversationSchemaProcessor.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConversationField = void 0;\nconst Authorization_1 = require(\"../Authorization\");\nconst utils_1 = require(\"../runtime/utils\");\nconst createConversationField = (typeDef, typeName) => {\n const { aiModel, systemPrompt, handler, tools } = typeDef;\n const { strategy, provider } = extractAuthorization(typeDef, typeName);\n const args = {\n aiModel: aiModel.resourcePath,\n // This is done to escape newlines in potentially multi-line system prompts\n // e.g.\n // realtorChat: a.conversation({\n // aiModel: a.ai.model('Claude 3 Haiku'),\n // systemPrompt: `You are a helpful real estate assistant\n // Respond in the poetic form of haiku.`,\n // }),\n //\n // It doesn't affect non multi-line string inputs for system prompts\n systemPrompt: systemPrompt.replace(/\\r?\\n/g, '\\\\n'),\n };\n const argsString = Object.entries(args)\n .map(([key, value]) => `${key}: \"${value}\"`)\n .join(', ');\n const authString = `, auth: { strategy: ${strategy}, provider: ${provider} }`;\n const functionHandler = {};\n let handlerString = '';\n if (handler) {\n const functionName = `Fn${(0, utils_1.capitalize)(typeName)}`;\n const eventVersion = handler.eventVersion;\n handlerString = `, handler: { functionName: \"${functionName}\", eventVersion: \"${eventVersion}\" }`;\n functionHandler[functionName] = handler;\n }\n const toolsString = tools?.length\n ? `, tools: [${getConversationToolsString(tools)}]`\n : '';\n const conversationDirective = `@conversation(${argsString}${authString}${handlerString}${toolsString})`;\n const field = `${typeName}(conversationId: ID!, content: [AmplifyAIContentBlockInput], aiContext: AWSJSON, toolConfiguration: AmplifyAIToolConfigurationInput): AmplifyAIConversationMessage ${conversationDirective} @aws_cognito_user_pools`;\n return { field, functionHandler };\n};\nexports.createConversationField = createConversationField;\nconst isRef = (query) => query?.data?.type === 'ref';\nconst extractAuthorization = (typeDef, typeName) => {\n const { authorization } = typeDef.data;\n if (authorization.length === 0) {\n throw new Error(`Conversation ${typeName} is missing authorization rules. Use .authorization((allow) => allow.owner()) to configure authorization for your conversation route.`);\n }\n const { strategy, provider } = (0, Authorization_1.accessData)(authorization[0]);\n if (strategy !== 'owner' || provider !== 'userPools') {\n throw new Error(`Conversation ${typeName} must use owner authorization with a user pool provider. Use .authorization((allow) => allow.owner()) to configure authorization for your conversation route.`);\n }\n return { strategy, provider };\n};\nconst getConversationToolsString = (tools) => tools\n .map((tool) => {\n const { name, description } = tool;\n // https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ToolSpecification.html\n // Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$\n // Length Constraints: Minimum length of 1. Maximum length of 64.\n const isValidToolName = /^[a-zA-Z][a-zA-Z0-9_]*$/.test(name) &&\n name.length >= 1 &&\n name.length <= 64;\n if (!isValidToolName) {\n throw new Error(`Tool name must be between 1 and 64 characters, start with a letter, and contain only letters, numbers, and underscores. Found: ${name}`);\n }\n const toolDefinition = extractToolDefinition(tool);\n return `{ name: \"${name}\", description: \"${description}\", ${toolDefinition} }`;\n})\n .join(', ');\nconst extractToolDefinition = (tool) => {\n if ('model' in tool) {\n if (!isRef(tool.model))\n throw new Error(`Unexpected model was found in tool ${tool}.`);\n const { model, modelOperation } = tool;\n return `modelName: \"${model.data.link}\", modelOperation: ${modelOperation}`;\n }\n if (!isRef(tool.query))\n throw new Error(`Unexpected query was found in tool ${tool}.`);\n return `queryName: \"${tool.query.data.link}\"`;\n};\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,uBAAuB,GAAG,KAAK,CAAC,CAAC;AACzC,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACpD,MAAM,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC5C,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK;AACvD,IAAI,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;AAC9D,IAAI,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,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AAC,CAAC,CAAC;AAClD,CAAC;;"}
@@ -3,11 +3,71 @@
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.conversation = exports.brandName = void 0;
6
+ exports.conversation = exports.dataTool = exports.brandName = void 0;
7
+ const Authorization_1 = require("../Authorization");
7
8
  const util_1 = require("../util");
8
9
  exports.brandName = 'conversationCustomOperation';
10
+ /**
11
+ * @experimental
12
+ *
13
+ * Define a data tool to be used within an AI conversation route.
14
+ *
15
+ * @remarks
16
+ *
17
+ * Data tools can use a model generated list query or a custom query.
18
+ * The tool's name must satisfy the following requirements:
19
+ * - Be unique across all tools for a given conversation.
20
+ * - Length must be between 1 and 64 characters.
21
+ * - Must start with a letter.
22
+ * - Must contain only letters, numbers, and underscores.
23
+ *
24
+ * The tool's `name` and `description` are used by the LLM to help it understand
25
+ * the tool's purpose.
26
+ *
27
+ * @example
28
+ *
29
+ * realtorChat: a.conversation({
30
+ * aiModel: a.ai.model('Claude 3 Haiku'),
31
+ * systemPrompt: 'You are a helpful real estate assistant',
32
+ * tools: [
33
+ * // Data tools can use a model generated list query.
34
+ * a.ai.dataTool({
35
+ * name: 'get_listed_properties',
36
+ * description: 'Get properties currently listed for sale',
37
+ * model: a.model('RealEstateProperty'),
38
+ * modelOperation: 'list',
39
+ * }),
40
+ * // Data tools can also use a custom query.
41
+ * a.ai.dataTool({
42
+ * name: 'get_oncall_realtor',
43
+ * description: 'Get the oncall realtor',
44
+ * query: a.query('getOnCallRealtor'),
45
+ * }),
46
+ * ],
47
+ * })
48
+ * @returns a data tool definition
49
+ */
50
+ function dataTool(input) {
51
+ return input;
52
+ }
53
+ exports.dataTool = dataTool;
9
54
  function _conversation(input) {
10
- return { ...(0, util_1.brand)(exports.brandName), ...input };
55
+ const data = {
56
+ authorization: [],
57
+ };
58
+ const builder = {
59
+ authorization(callback) {
60
+ const rules = callback(Authorization_1.allowForConversations);
61
+ data.authorization = Array.isArray(rules) ? rules : [rules];
62
+ return this;
63
+ },
64
+ };
65
+ return {
66
+ ...(0, util_1.brand)(exports.brandName),
67
+ ...input,
68
+ ...builder,
69
+ data,
70
+ };
11
71
  }
12
72
  /**
13
73
  * @experimental
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationType.js","sources":["../../../src/ai/ConversationType.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.conversation = exports.brandName = void 0;\nconst util_1 = require(\"../util\");\nexports.brandName = 'conversationCustomOperation';\nfunction _conversation(input) {\n return { ...(0, util_1.brand)(exports.brandName), ...input };\n}\n/**\n * @experimental\n *\n * Define an AI conversation route which enables multi-turn conversation APIs for interacting with specified AI model.\n * @example\n * realtorChat: a.conversation({\n * aiModel: { resourcePath },\n * systemPrompt: 'You are a helpful real estate assistant',\n * })\n * @returns a conversation route definition\n */\nfunction conversation(input) {\n return _conversation(input);\n}\nexports.conversation = conversation;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,OAAO,CAAC,SAAS,GAAG,6BAA6B,CAAC;AAClD,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,OAAO,EAAE,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;AACjE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
1
+ {"version":3,"file":"ConversationType.js","sources":["../../../src/ai/ConversationType.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.conversation = exports.dataTool = exports.brandName = void 0;\nconst Authorization_1 = require(\"../Authorization\");\nconst util_1 = require(\"../util\");\nexports.brandName = 'conversationCustomOperation';\n/**\n * @experimental\n *\n * Define a data tool to be used within an AI conversation route.\n *\n * @remarks\n *\n * Data tools can use a model generated list query or a custom query.\n * The tool's name must satisfy the following requirements:\n * - Be unique across all tools for a given conversation.\n * - Length must be between 1 and 64 characters.\n * - Must start with a letter.\n * - Must contain only letters, numbers, and underscores.\n *\n * The tool's `name` and `description` are used by the LLM to help it understand\n * the tool's purpose.\n *\n * @example\n *\n * realtorChat: a.conversation({\n * aiModel: a.ai.model('Claude 3 Haiku'),\n * systemPrompt: 'You are a helpful real estate assistant',\n * tools: [\n * // Data tools can use a model generated list query.\n * a.ai.dataTool({\n * name: 'get_listed_properties',\n * description: 'Get properties currently listed for sale',\n * model: a.model('RealEstateProperty'),\n * modelOperation: 'list',\n * }),\n * // Data tools can also use a custom query.\n * a.ai.dataTool({\n * name: 'get_oncall_realtor',\n * description: 'Get the oncall realtor',\n * query: a.query('getOnCallRealtor'),\n * }),\n * ],\n * })\n * @returns a data tool definition\n */\nfunction dataTool(input) {\n return input;\n}\nexports.dataTool = dataTool;\nfunction _conversation(input) {\n const data = {\n authorization: [],\n };\n const builder = {\n authorization(callback) {\n const rules = callback(Authorization_1.allowForConversations);\n data.authorization = Array.isArray(rules) ? rules : [rules];\n return this;\n },\n };\n return {\n ...(0, util_1.brand)(exports.brandName),\n ...input,\n ...builder,\n data,\n };\n}\n/**\n * @experimental\n *\n * Define an AI conversation route which enables multi-turn conversation APIs for interacting with specified AI model.\n * @example\n * realtorChat: a.conversation({\n * aiModel: { resourcePath },\n * systemPrompt: 'You are a helpful real estate assistant',\n * })\n * @returns a conversation route definition\n */\nfunction conversation(input) {\n return _conversation(input);\n}\nexports.conversation = conversation;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AACrE,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACpD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,OAAO,CAAC,SAAS,GAAG,6BAA6B,CAAC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,IAAI,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,aAAa,EAAE,EAAE;AACzB,KAAK,CAAC;AACN,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,aAAa,CAAC,QAAQ,EAAE;AAChC,YAAY,MAAM,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;AAC1E,YAAY,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AACxE,YAAY,OAAO,IAAI,CAAC;AACxB,SAAS;AACT,KAAK,CAAC;AACN,IAAI,OAAO;AACX,QAAQ,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;AAC/C,QAAQ,GAAG,KAAK;AAChB,QAAQ,GAAG,OAAO;AAClB,QAAQ,IAAI;AACZ,KAAK,CAAC;AACN,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
@@ -304,6 +304,12 @@ export declare const allowForCustomOperations: {
304
304
  readonly groups: (groups: string[], provider?: GroupProvider) => Authorization<"groups", undefined, false>;
305
305
  readonly custom: (provider?: CustomProvider) => Authorization<"custom", undefined, false>;
306
306
  };
307
+ export declare const allowForConversations: {
308
+ readonly owner: () => Authorization<"owner", undefined, false> & {
309
+ to: typeof to;
310
+ identityClaim: typeof identityClaim;
311
+ };
312
+ };
307
313
  declare function resourceTo<SELF extends ResourceAuthorization>(this: SELF, operations: ResourceOperation[]): Omit<SELF, "to">;
308
314
  /**
309
315
  * Turns the type from a list of `Authorization` rules like this:
@@ -368,4 +374,5 @@ export declare const accessData: <T extends Authorization<any, any, any>>(author
368
374
  export declare const accessSchemaData: <T extends SchemaAuthorization<any, any, any>>(authorization: T) => T[typeof __data];
369
375
  export type AllowModifier = typeof allow;
370
376
  export type AllowModifierForCustomOperation = typeof allowForCustomOperations;
377
+ export type AllowModifierForConversations = typeof allowForConversations;
371
378
  export {};
@@ -425,6 +425,17 @@ const allowForCustomOperations = {
425
425
  }, {});
426
426
  },
427
427
  };
428
+ const allowForConversations = {
429
+ owner() {
430
+ return authData({
431
+ strategy: 'owner',
432
+ provider: 'userPools',
433
+ }, {
434
+ to,
435
+ identityClaim,
436
+ });
437
+ },
438
+ };
428
439
  function resourceTo(operations) {
429
440
  this[__data].operations = operations;
430
441
  return omit(this, 'to');
@@ -442,5 +453,5 @@ const accessData = (authorization) => authorization[__data];
442
453
  // TODO: delete when we make resource auth available at each level in the schema (model, field)
443
454
  const accessSchemaData = (authorization) => authorization[__data];
444
455
 
445
- export { CustomProviders, GroupProviders, Operations, OwnerProviders, PrivateProviders, Providers, PublicProviders, ResourceOperations, Strategies, accessData, accessSchemaData, allow, allowForCustomOperations };
456
+ export { CustomProviders, GroupProviders, Operations, OwnerProviders, PrivateProviders, Providers, PublicProviders, ResourceOperations, Strategies, accessData, accessSchemaData, allow, allowForConversations, allowForCustomOperations };
446
457
  //# sourceMappingURL=Authorization.mjs.map