@aws-amplify/data-schema 1.19.0 → 1.20.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.
Files changed (198) hide show
  1. package/dist/cjs/Authorization.js.map +1 -1
  2. package/dist/cjs/ClientSchema/utilities/index.js.map +1 -1
  3. package/dist/cjs/CombineSchema.js +2 -2
  4. package/dist/cjs/CombineSchema.js.map +1 -1
  5. package/dist/cjs/CustomOperation.js +5 -5
  6. package/dist/cjs/CustomOperation.js.map +1 -1
  7. package/dist/cjs/CustomType.js +1 -2
  8. package/dist/cjs/CustomType.js.map +1 -1
  9. package/dist/cjs/EnumType.js +1 -2
  10. package/dist/cjs/EnumType.js.map +1 -1
  11. package/dist/cjs/Handler.js +2 -2
  12. package/dist/cjs/Handler.js.map +1 -1
  13. package/dist/cjs/ModelField.js +24 -17
  14. package/dist/cjs/ModelField.js.map +1 -1
  15. package/dist/cjs/ModelIndex.js +1 -2
  16. package/dist/cjs/ModelIndex.js.map +1 -1
  17. package/dist/cjs/ModelRelationshipField.js +4 -4
  18. package/dist/cjs/ModelRelationshipField.js.map +1 -1
  19. package/dist/cjs/ModelSchema.js +3 -3
  20. package/dist/cjs/ModelSchema.js.map +1 -1
  21. package/dist/cjs/ModelType.js +2 -2
  22. package/dist/cjs/ModelType.js.map +1 -1
  23. package/dist/cjs/RefType.js +1 -2
  24. package/dist/cjs/RefType.js.map +1 -1
  25. package/dist/cjs/SchemaProcessor.js +12 -3
  26. package/dist/cjs/SchemaProcessor.js.map +1 -1
  27. package/dist/cjs/Validate.js +145 -0
  28. package/dist/cjs/Validate.js.map +1 -0
  29. package/dist/cjs/a.js.map +1 -1
  30. package/dist/cjs/ai/ConversationSchemaGraphQLTypes.js.map +1 -1
  31. package/dist/cjs/ai/ConversationSchemaProcessor.js.map +1 -1
  32. package/dist/cjs/ai/ConversationType.js +3 -3
  33. package/dist/cjs/ai/ConversationType.js.map +1 -1
  34. package/dist/cjs/ai/ModelType.js +1 -2
  35. package/dist/cjs/ai/ModelType.js.map +1 -1
  36. package/dist/cjs/index.js.map +1 -1
  37. package/dist/cjs/internals/index.js.map +1 -1
  38. package/dist/cjs/runtime/addSchemaToClient.js +1 -2
  39. package/dist/cjs/runtime/addSchemaToClient.js.map +1 -1
  40. package/dist/cjs/runtime/addSchemaToClientWithInstance.js +1 -2
  41. package/dist/cjs/runtime/addSchemaToClientWithInstance.js.map +1 -1
  42. package/dist/cjs/runtime/bridge-types.js.map +1 -1
  43. package/dist/cjs/runtime/client/index.js.map +1 -1
  44. package/dist/cjs/runtime/client/index.v3.js.map +1 -1
  45. package/dist/cjs/runtime/index.js.map +1 -1
  46. package/dist/cjs/runtime/index.v3.js.map +1 -1
  47. package/dist/cjs/runtime/internals/APIClient.js +10 -10
  48. package/dist/cjs/runtime/internals/APIClient.js.map +1 -1
  49. package/dist/cjs/runtime/internals/ai/conversationMessageDeserializers.js.map +1 -1
  50. package/dist/cjs/runtime/internals/ai/conversationMessageSerializers.js.map +1 -1
  51. package/dist/cjs/runtime/internals/ai/conversationStreamEventDeserializers.js.map +1 -1
  52. package/dist/cjs/runtime/internals/ai/convertItemToConversation.js.map +1 -1
  53. package/dist/cjs/runtime/internals/ai/convertItemToConversationMessage.js.map +1 -1
  54. package/dist/cjs/runtime/internals/ai/createCreateConversationFunction.js.map +1 -1
  55. package/dist/cjs/runtime/internals/ai/createDeleteConversationFunction.js.map +1 -1
  56. package/dist/cjs/runtime/internals/ai/createGetConversationFunction.js.map +1 -1
  57. package/dist/cjs/runtime/internals/ai/createListConversationsFunction.js.map +1 -1
  58. package/dist/cjs/runtime/internals/ai/createListMessagesFunction.js.map +1 -1
  59. package/dist/cjs/runtime/internals/ai/createOnStreamEventFunction.js.map +1 -1
  60. package/dist/cjs/runtime/internals/ai/createSendMessageFunction.js.map +1 -1
  61. package/dist/cjs/runtime/internals/ai/createUpdateConversationFunction.js.map +1 -1
  62. package/dist/cjs/runtime/internals/ai/getCustomUserAgentDetails.js +2 -2
  63. package/dist/cjs/runtime/internals/ai/getCustomUserAgentDetails.js.map +1 -1
  64. package/dist/cjs/runtime/internals/cancellation.js +2 -3
  65. package/dist/cjs/runtime/internals/cancellation.js.map +1 -1
  66. package/dist/cjs/runtime/internals/clientUtils.js.map +1 -1
  67. package/dist/cjs/runtime/internals/generateCustomOperationsProperty.js +4 -5
  68. package/dist/cjs/runtime/internals/generateCustomOperationsProperty.js.map +1 -1
  69. package/dist/cjs/runtime/internals/index.js.map +1 -1
  70. package/dist/cjs/runtime/internals/operations/custom.js +1 -2
  71. package/dist/cjs/runtime/internals/operations/custom.js.map +1 -1
  72. package/dist/cjs/runtime/internals/operations/get.js +1 -2
  73. package/dist/cjs/runtime/internals/operations/get.js.map +1 -1
  74. package/dist/cjs/runtime/internals/operations/indexQuery.js +1 -2
  75. package/dist/cjs/runtime/internals/operations/indexQuery.js.map +1 -1
  76. package/dist/cjs/runtime/internals/operations/list.js +1 -2
  77. package/dist/cjs/runtime/internals/operations/list.js.map +1 -1
  78. package/dist/cjs/runtime/internals/operations/observeQuery.js +1 -2
  79. package/dist/cjs/runtime/internals/operations/observeQuery.js.map +1 -1
  80. package/dist/cjs/runtime/internals/operations/subscription.js +1 -2
  81. package/dist/cjs/runtime/internals/operations/subscription.js.map +1 -1
  82. package/dist/cjs/runtime/internals/operations/utils.js +2 -3
  83. package/dist/cjs/runtime/internals/operations/utils.js.map +1 -1
  84. package/dist/cjs/runtime/internals/server/generateModelsProperty.js +1 -2
  85. package/dist/cjs/runtime/internals/server/generateModelsProperty.js.map +1 -1
  86. package/dist/cjs/runtime/internals/server/index.js.map +1 -1
  87. package/dist/cjs/runtime/internals/utils/clientProperties/generateConversationsProperty.js +1 -2
  88. package/dist/cjs/runtime/internals/utils/clientProperties/generateConversationsProperty.js.map +1 -1
  89. package/dist/cjs/runtime/internals/utils/clientProperties/generateEnumsProperty.js.map +1 -1
  90. package/dist/cjs/runtime/internals/utils/clientProperties/generateGenerationsProperty.js +1 -2
  91. package/dist/cjs/runtime/internals/utils/clientProperties/generateGenerationsProperty.js.map +1 -1
  92. package/dist/cjs/runtime/internals/utils/clientProperties/generateModelsProperty.js +1 -2
  93. package/dist/cjs/runtime/internals/utils/clientProperties/generateModelsProperty.js.map +1 -1
  94. package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.js +1 -2
  95. package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.js.map +1 -1
  96. package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.js +1 -2
  97. package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.js.map +1 -1
  98. package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.js +1 -2
  99. package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.js.map +1 -1
  100. package/dist/cjs/runtime/utils/findIndexByFields.js +1 -2
  101. package/dist/cjs/runtime/utils/findIndexByFields.js.map +1 -1
  102. package/dist/cjs/runtime/utils/index.js.map +1 -1
  103. package/dist/cjs/runtime/utils/resolveOwnerFields.js +1 -2
  104. package/dist/cjs/runtime/utils/resolveOwnerFields.js.map +1 -1
  105. package/dist/cjs/runtime/utils/resolvePKFields.js +1 -2
  106. package/dist/cjs/runtime/utils/resolvePKFields.js.map +1 -1
  107. package/dist/cjs/runtime/utils/selfAwareAsync.js +1 -2
  108. package/dist/cjs/runtime/utils/selfAwareAsync.js.map +1 -1
  109. package/dist/cjs/runtime/utils/stringTransformation.js +1 -2
  110. package/dist/cjs/runtime/utils/stringTransformation.js.map +1 -1
  111. package/dist/cjs/util/Brand.js +3 -3
  112. package/dist/cjs/util/Brand.js.map +1 -1
  113. package/dist/cjs/util/index.js.map +1 -1
  114. package/dist/esm/Authorization.d.ts +8 -8
  115. package/dist/esm/Authorization.mjs.map +1 -1
  116. package/dist/esm/CombineSchema.mjs.map +1 -1
  117. package/dist/esm/CustomOperation.mjs.map +1 -1
  118. package/dist/esm/CustomType.mjs.map +1 -1
  119. package/dist/esm/EnumType.mjs.map +1 -1
  120. package/dist/esm/Handler.mjs.map +1 -1
  121. package/dist/esm/ModelField.d.ts +39 -24
  122. package/dist/esm/ModelField.mjs +9 -2
  123. package/dist/esm/ModelField.mjs.map +1 -1
  124. package/dist/esm/ModelIndex.mjs.map +1 -1
  125. package/dist/esm/ModelRelationshipField.mjs.map +1 -1
  126. package/dist/esm/ModelSchema.mjs.map +1 -1
  127. package/dist/esm/ModelType.d.ts +1 -1
  128. package/dist/esm/ModelType.mjs.map +1 -1
  129. package/dist/esm/RefType.mjs.map +1 -1
  130. package/dist/esm/SchemaProcessor.mjs +12 -2
  131. package/dist/esm/SchemaProcessor.mjs.map +1 -1
  132. package/dist/esm/Validate.d.ts +218 -0
  133. package/dist/esm/Validate.mjs +142 -0
  134. package/dist/esm/Validate.mjs.map +1 -0
  135. package/dist/esm/ai/ConversationSchemaGraphQLTypes.mjs.map +1 -1
  136. package/dist/esm/ai/ConversationSchemaProcessor.mjs.map +1 -1
  137. package/dist/esm/ai/ConversationType.mjs.map +1 -1
  138. package/dist/esm/ai/ModelType.mjs.map +1 -1
  139. package/dist/esm/index.d.ts +1 -1
  140. package/dist/esm/runtime/addSchemaToClient.mjs.map +1 -1
  141. package/dist/esm/runtime/addSchemaToClientWithInstance.mjs.map +1 -1
  142. package/dist/esm/runtime/bridge-types.mjs.map +1 -1
  143. package/dist/esm/runtime/internals/APIClient.mjs.map +1 -1
  144. package/dist/esm/runtime/internals/ai/conversationMessageDeserializers.mjs.map +1 -1
  145. package/dist/esm/runtime/internals/ai/conversationMessageSerializers.mjs.map +1 -1
  146. package/dist/esm/runtime/internals/ai/conversationStreamEventDeserializers.mjs.map +1 -1
  147. package/dist/esm/runtime/internals/ai/convertItemToConversation.mjs.map +1 -1
  148. package/dist/esm/runtime/internals/ai/createCreateConversationFunction.d.ts +1 -1
  149. package/dist/esm/runtime/internals/ai/createCreateConversationFunction.mjs.map +1 -1
  150. package/dist/esm/runtime/internals/ai/createDeleteConversationFunction.d.ts +1 -1
  151. package/dist/esm/runtime/internals/ai/createDeleteConversationFunction.mjs.map +1 -1
  152. package/dist/esm/runtime/internals/ai/createGetConversationFunction.d.ts +1 -1
  153. package/dist/esm/runtime/internals/ai/createGetConversationFunction.mjs.map +1 -1
  154. package/dist/esm/runtime/internals/ai/createListConversationsFunction.d.ts +1 -1
  155. package/dist/esm/runtime/internals/ai/createListConversationsFunction.mjs.map +1 -1
  156. package/dist/esm/runtime/internals/ai/createListMessagesFunction.d.ts +1 -1
  157. package/dist/esm/runtime/internals/ai/createListMessagesFunction.mjs.map +1 -1
  158. package/dist/esm/runtime/internals/ai/createOnStreamEventFunction.d.ts +1 -1
  159. package/dist/esm/runtime/internals/ai/createOnStreamEventFunction.mjs.map +1 -1
  160. package/dist/esm/runtime/internals/ai/createSendMessageFunction.d.ts +1 -1
  161. package/dist/esm/runtime/internals/ai/createSendMessageFunction.mjs +1 -1
  162. package/dist/esm/runtime/internals/ai/createSendMessageFunction.mjs.map +1 -1
  163. package/dist/esm/runtime/internals/ai/createUpdateConversationFunction.d.ts +1 -1
  164. package/dist/esm/runtime/internals/ai/createUpdateConversationFunction.mjs.map +1 -1
  165. package/dist/esm/runtime/internals/ai/getCustomUserAgentDetails.mjs.map +1 -1
  166. package/dist/esm/runtime/internals/cancellation.mjs.map +1 -1
  167. package/dist/esm/runtime/internals/clientUtils.mjs.map +1 -1
  168. package/dist/esm/runtime/internals/generateCustomOperationsProperty.d.ts +3 -3
  169. package/dist/esm/runtime/internals/generateCustomOperationsProperty.mjs.map +1 -1
  170. package/dist/esm/runtime/internals/operations/custom.mjs.map +1 -1
  171. package/dist/esm/runtime/internals/operations/get.mjs.map +1 -1
  172. package/dist/esm/runtime/internals/operations/indexQuery.mjs +1 -1
  173. package/dist/esm/runtime/internals/operations/indexQuery.mjs.map +1 -1
  174. package/dist/esm/runtime/internals/operations/list.mjs.map +1 -1
  175. package/dist/esm/runtime/internals/operations/observeQuery.mjs.map +1 -1
  176. package/dist/esm/runtime/internals/operations/subscription.mjs.map +1 -1
  177. package/dist/esm/runtime/internals/operations/utils.mjs.map +1 -1
  178. package/dist/esm/runtime/internals/server/generateModelsProperty.mjs.map +1 -1
  179. package/dist/esm/runtime/internals/utils/clientProperties/generateConversationsProperty.mjs.map +1 -1
  180. package/dist/esm/runtime/internals/utils/clientProperties/generateEnumsProperty.d.ts +1 -1
  181. package/dist/esm/runtime/internals/utils/clientProperties/generateEnumsProperty.mjs.map +1 -1
  182. package/dist/esm/runtime/internals/utils/clientProperties/generateGenerationsProperty.mjs.map +1 -1
  183. package/dist/esm/runtime/internals/utils/clientProperties/generateModelsProperty.mjs.map +1 -1
  184. package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs.map +1 -1
  185. package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs.map +1 -1
  186. package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs.map +1 -1
  187. package/dist/esm/runtime/utils/findIndexByFields.mjs.map +1 -1
  188. package/dist/esm/runtime/utils/resolveOwnerFields.mjs.map +1 -1
  189. package/dist/esm/runtime/utils/resolvePKFields.mjs.map +1 -1
  190. package/dist/esm/runtime/utils/selfAwareAsync.mjs.map +1 -1
  191. package/dist/esm/runtime/utils/stringTransformation.mjs.map +1 -1
  192. package/dist/esm/util/Brand.mjs.map +1 -1
  193. package/dist/meta/cjs.tsbuildinfo +1 -1
  194. package/package.json +1 -1
  195. package/src/ModelField.ts +70 -29
  196. package/src/SchemaProcessor.ts +12 -0
  197. package/src/Validate.ts +418 -0
  198. package/src/index.ts +1 -1
@@ -0,0 +1,145 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ValidationType = void 0;
5
+ exports.createValidationBuilder = createValidationBuilder;
6
+ /**
7
+ * The types of validations supported
8
+ */
9
+ var ValidationType;
10
+ (function (ValidationType) {
11
+ ValidationType["GT"] = "gt";
12
+ ValidationType["LT"] = "lt";
13
+ ValidationType["GTE"] = "gte";
14
+ ValidationType["LTE"] = "lte";
15
+ ValidationType["MIN_LENGTH"] = "minLength";
16
+ ValidationType["MAX_LENGTH"] = "maxLength";
17
+ ValidationType["STARTS_WITH"] = "startsWith";
18
+ ValidationType["ENDS_WITH"] = "endsWith";
19
+ ValidationType["MATCHES"] = "matches";
20
+ })(ValidationType || (exports.ValidationType = ValidationType = {}));
21
+ /**
22
+ * Creates an internal validation builder for a specific field type
23
+ * @typeParam T - The type of the field being validated
24
+ */
25
+ function createValidationBuilderInternal() {
26
+ const rules = [];
27
+ const builder = {
28
+ /**
29
+ * Validates that a numeric field is greater than the specified value
30
+ * @param value - The value that the field must be greater than
31
+ * @param errorMessage - Optional custom error message
32
+ */
33
+ gt(value, errorMessage) {
34
+ rules.push({ type: ValidationType.GT, value, errorMessage });
35
+ return this;
36
+ },
37
+ /**
38
+ * Validates that a numeric field is less than the specified value
39
+ * @param value - The value that the field must be less than
40
+ * @param errorMessage - Optional custom error message
41
+ */
42
+ lt(value, errorMessage) {
43
+ rules.push({ type: ValidationType.LT, value, errorMessage });
44
+ return this;
45
+ },
46
+ /**
47
+ * Validates that a numeric field is greater than or equal to the specified value
48
+ * @param value - The value that the field must be greater than or equal to
49
+ * @param errorMessage - Optional custom error message
50
+ */
51
+ gte(value, errorMessage) {
52
+ rules.push({ type: ValidationType.GTE, value, errorMessage });
53
+ return this;
54
+ },
55
+ /**
56
+ * Validates that a numeric field is less than or equal to the specified value
57
+ * @param value - The value that the field must be less than or equal to
58
+ * @param errorMessage - Optional custom error message
59
+ */
60
+ lte(value, errorMessage) {
61
+ rules.push({ type: ValidationType.LTE, value, errorMessage });
62
+ return this;
63
+ },
64
+ /**
65
+ * Validates that a numeric field is positive. We use gt(0) internally to achieve this.
66
+ * @param errorMessage - Optional custom error message
67
+ */
68
+ positive(errorMessage) {
69
+ rules.push({ type: ValidationType.GT, value: 0, errorMessage });
70
+ return this;
71
+ },
72
+ /**
73
+ * Validates that a numeric field is negative. We use lt(0) internally to achieve this.
74
+ * @param errorMessage - Optional custom error message
75
+ */
76
+ negative(errorMessage) {
77
+ rules.push({ type: ValidationType.LT, value: 0, errorMessage });
78
+ return this;
79
+ },
80
+ /**
81
+ * Validates that a string field has at least the specified length
82
+ * @param length - The minimum length required
83
+ * @param errorMessage - Optional custom error message
84
+ */
85
+ minLength(length, errorMessage) {
86
+ rules.push({ type: ValidationType.MIN_LENGTH, value: length, errorMessage });
87
+ return this;
88
+ },
89
+ /**
90
+ * Validates that a string field does not exceed the specified length
91
+ * @param length - The maximum length allowed
92
+ * @param errorMessage - Optional custom error message
93
+ */
94
+ maxLength(length, errorMessage) {
95
+ rules.push({ type: ValidationType.MAX_LENGTH, value: length, errorMessage });
96
+ return this;
97
+ },
98
+ /**
99
+ * Validates that a string field starts with the specified prefix
100
+ * @param prefix - The prefix the string must start with
101
+ * @param errorMessage - Optional custom error message
102
+ */
103
+ startsWith(prefix, errorMessage) {
104
+ rules.push({ type: ValidationType.STARTS_WITH, value: prefix, errorMessage });
105
+ return this;
106
+ },
107
+ /**
108
+ * Validates that a string field ends with the specified suffix
109
+ * @param suffix - The suffix the string must end with
110
+ * @param errorMessage - Optional custom error message
111
+ */
112
+ endsWith(suffix, errorMessage) {
113
+ rules.push({ type: ValidationType.ENDS_WITH, value: suffix, errorMessage });
114
+ return this;
115
+ },
116
+ /**
117
+ * Validates that a string field matches the specified regular expression pattern
118
+ * @param pattern - The regex pattern the string must match
119
+ * @param errorMessage - Optional custom error message
120
+ */
121
+ matches(pattern, errorMessage) {
122
+ rules.push({ type: ValidationType.MATCHES, value: pattern, errorMessage });
123
+ return this;
124
+ },
125
+ /**
126
+ * Returns all the validation rules defined by this builder
127
+ */
128
+ getRules() {
129
+ return rules;
130
+ }
131
+ };
132
+ return builder;
133
+ }
134
+ /**
135
+ * Creates a type-safe validation builder for a specific field type with access to get the rules
136
+ * @returns An object containing the validation builder and a function to get the rules
137
+ */
138
+ function createValidationBuilder() {
139
+ const internalBuilder = createValidationBuilderInternal();
140
+ return {
141
+ builder: internalBuilder,
142
+ getRules: () => internalBuilder.getRules()
143
+ };
144
+ }
145
+ //# sourceMappingURL=Validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validate.js","sources":["../../src/Validate.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidationType = void 0;\nexports.createValidationBuilder = createValidationBuilder;\n/**\n * The types of validations supported\n */\nvar ValidationType;\n(function (ValidationType) {\n ValidationType[\"GT\"] = \"gt\";\n ValidationType[\"LT\"] = \"lt\";\n ValidationType[\"GTE\"] = \"gte\";\n ValidationType[\"LTE\"] = \"lte\";\n ValidationType[\"MIN_LENGTH\"] = \"minLength\";\n ValidationType[\"MAX_LENGTH\"] = \"maxLength\";\n ValidationType[\"STARTS_WITH\"] = \"startsWith\";\n ValidationType[\"ENDS_WITH\"] = \"endsWith\";\n ValidationType[\"MATCHES\"] = \"matches\";\n})(ValidationType || (exports.ValidationType = ValidationType = {}));\n/**\n * Creates an internal validation builder for a specific field type\n * @typeParam T - The type of the field being validated\n */\nfunction createValidationBuilderInternal() {\n const rules = [];\n const builder = {\n /**\n * Validates that a numeric field is greater than the specified value\n * @param value - The value that the field must be greater than\n * @param errorMessage - Optional custom error message\n */\n gt(value, errorMessage) {\n rules.push({ type: ValidationType.GT, value, errorMessage });\n return this;\n },\n /**\n * Validates that a numeric field is less than the specified value\n * @param value - The value that the field must be less than\n * @param errorMessage - Optional custom error message\n */\n lt(value, errorMessage) {\n rules.push({ type: ValidationType.LT, value, errorMessage });\n return this;\n },\n /**\n * Validates that a numeric field is greater than or equal to the specified value\n * @param value - The value that the field must be greater than or equal to\n * @param errorMessage - Optional custom error message\n */\n gte(value, errorMessage) {\n rules.push({ type: ValidationType.GTE, value, errorMessage });\n return this;\n },\n /**\n * Validates that a numeric field is less than or equal to the specified value\n * @param value - The value that the field must be less than or equal to\n * @param errorMessage - Optional custom error message\n */\n lte(value, errorMessage) {\n rules.push({ type: ValidationType.LTE, value, errorMessage });\n return this;\n },\n /**\n * Validates that a numeric field is positive. We use gt(0) internally to achieve this.\n * @param errorMessage - Optional custom error message\n */\n positive(errorMessage) {\n rules.push({ type: ValidationType.GT, value: 0, errorMessage });\n return this;\n },\n /**\n * Validates that a numeric field is negative. We use lt(0) internally to achieve this.\n * @param errorMessage - Optional custom error message\n */\n negative(errorMessage) {\n rules.push({ type: ValidationType.LT, value: 0, errorMessage });\n return this;\n },\n /**\n * Validates that a string field has at least the specified length\n * @param length - The minimum length required\n * @param errorMessage - Optional custom error message\n */\n minLength(length, errorMessage) {\n rules.push({ type: ValidationType.MIN_LENGTH, value: length, errorMessage });\n return this;\n },\n /**\n * Validates that a string field does not exceed the specified length\n * @param length - The maximum length allowed\n * @param errorMessage - Optional custom error message\n */\n maxLength(length, errorMessage) {\n rules.push({ type: ValidationType.MAX_LENGTH, value: length, errorMessage });\n return this;\n },\n /**\n * Validates that a string field starts with the specified prefix\n * @param prefix - The prefix the string must start with\n * @param errorMessage - Optional custom error message\n */\n startsWith(prefix, errorMessage) {\n rules.push({ type: ValidationType.STARTS_WITH, value: prefix, errorMessage });\n return this;\n },\n /**\n * Validates that a string field ends with the specified suffix\n * @param suffix - The suffix the string must end with\n * @param errorMessage - Optional custom error message\n */\n endsWith(suffix, errorMessage) {\n rules.push({ type: ValidationType.ENDS_WITH, value: suffix, errorMessage });\n return this;\n },\n /**\n * Validates that a string field matches the specified regular expression pattern\n * @param pattern - The regex pattern the string must match\n * @param errorMessage - Optional custom error message\n */\n matches(pattern, errorMessage) {\n rules.push({ type: ValidationType.MATCHES, value: pattern, errorMessage });\n return this;\n },\n /**\n * Returns all the validation rules defined by this builder\n */\n getRules() {\n return rules;\n }\n };\n return builder;\n}\n/**\n * Creates a type-safe validation builder for a specific field type with access to get the rules\n * @returns An object containing the validation builder and a function to get the rules\n */\nfunction createValidationBuilder() {\n const internalBuilder = createValidationBuilderInternal();\n return {\n builder: internalBuilder,\n getRules: () => internalBuilder.getRules()\n };\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,cAAc,GAAG,MAAM;AAC/B,OAAO,CAAC,uBAAuB,GAAG,uBAAuB;AACzD;AACA;AACA;AACA,IAAI,cAAc;AAClB,CAAC,UAAU,cAAc,EAAE;AAC3B,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;AAC/B,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;AAC/B,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK;AACjC,IAAI,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK;AACjC,IAAI,cAAc,CAAC,YAAY,CAAC,GAAG,WAAW;AAC9C,IAAI,cAAc,CAAC,YAAY,CAAC,GAAG,WAAW;AAC9C,IAAI,cAAc,CAAC,aAAa,CAAC,GAAG,YAAY;AAChD,IAAI,cAAc,CAAC,WAAW,CAAC,GAAG,UAAU;AAC5C,IAAI,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS;AACzC,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,GAAG,cAAc,GAAG,EAAE,CAAC,CAAC;AACpE;AACA;AACA;AACA;AACA,SAAS,+BAA+B,GAAG;AAC3C,IAAI,MAAM,KAAK,GAAG,EAAE;AACpB,IAAI,MAAM,OAAO,GAAG;AACpB;AACA;AACA;AACA;AACA;AACA,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE;AAChC,YAAY,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;AACxE,YAAY,OAAO,IAAI;AACvB,SAA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AAE,eAAe;AAChC,QAAQ,QAAQ,EAAE,MAAM,eAAe,CAAC,QAAQ;AAChD,KAAK;AACL;;"}
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\");\n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AAC,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;;"}
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;AAC7D,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,MAAM;AAC/gB,MAAM,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9C,MAAM,CAAC,cAAc,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OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC;AAClI,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAC7C,MAAM,EAAE,GAAG;AACX,IAAI,KAAK,EAAE,WAAW,CAAC,KAAK;AAC5B,IAAI,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;AACzC,CAAC;AACD,OAAO,CAAC,EAAE,GAAG,EAAE;;"}
@@ -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 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 p: String\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;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 p: String\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;AAC7D,OAAO,CAAC,iCAAiC,GAAG,MAAM;AAClD,OAAO,CAAC,iCAAiC;AACzC,cAAc,CAAC;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC,CAAC;;"}
@@ -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 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,E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MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;AAC/C,QAAQ,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,mCAAmC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClD,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;AAC7D,OAAO,CAAC,uBAAuB,GAAG,MAAM;AACxC,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;AACnD,MAAM,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC3C,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK;AACvD,IAAI,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO;AAC7D,IAAI,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC;AAC1E,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,OAAO,EAAE,OAAO,CAAC,YAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC;AAC3D,KAAK;AACL,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI;AAC1C,SAAS,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AACnD,SAAS,IAAI,CAAC,IAAI,CAAC;AACnB,IAAI,MAAM,UAAU,GAAG,CAAC,oBAAoB,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC;AACjF,IAAI,MAAM,eAAe,GAAG,EAAE;AAC9B,IAAI,IAAI,aAAa,GAAG,EAAE;AAC1B,IAAI,IAAI,OAAO,EAAE;AACjB,QAAQ,MAAM,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C,mBAAmB,EAAE,cAAc,CAAC,CAAC;AACnF;AACA,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,mCAAmC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACtE,IAAI,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACjD,CAAC;;"}
@@ -3,7 +3,9 @@
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.dataTool = exports.brandName = void 0;
6
+ exports.brandName = void 0;
7
+ exports.dataTool = dataTool;
8
+ exports.conversation = conversation;
7
9
  const Authorization_1 = require("../Authorization");
8
10
  const util_1 = require("../util");
9
11
  exports.brandName = 'conversationCustomOperation';
@@ -48,7 +50,6 @@ exports.brandName = 'conversationCustomOperation';
48
50
  function dataTool(input) {
49
51
  return input;
50
52
  }
51
- exports.dataTool = dataTool;
52
53
  function _conversation(input) {
53
54
  const data = {
54
55
  authorization: [],
@@ -79,5 +80,4 @@ function _conversation(input) {
79
80
  function conversation(input) {
80
81
  return _conversation(input);
81
82
  }
82
- exports.conversation = conversation;
83
83
  //# sourceMappingURL=ConversationType.js.map
@@ -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.dataTool = exports.brandName = void 0;\nconst Authorization_1 = require(\"../Authorization\");\nconst util_1 = require(\"../util\");\nexports.brandName = 'conversationCustomOperation';\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 * 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,M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../../../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.brandName = void 0;\nexports.dataTool = dataTool;\nexports.conversation = conversation;\nconst Authorization_1 = require(\"../Authorization\");\nconst util_1 = require(\"../util\");\nexports.brandName = 'conversationCustomOperation';\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}\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 * 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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A;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC;AAC/B;;"}
@@ -3,7 +3,7 @@
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.model = void 0;
6
+ exports.model = model;
7
7
  const supportedModelsLookup = {
8
8
  // Amazon Nova models
9
9
  'Amazon Nova Pro': 'amazon.nova-pro-v1:0',
@@ -37,5 +37,4 @@ function model(modelName) {
37
37
  resourcePath: supportedModelsLookup[modelName],
38
38
  };
39
39
  }
40
- exports.model = model;
41
40
  //# sourceMappingURL=ModelType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModelType.js","sources":["../../../src/ai/ModelType.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.model = void 0;\nconst supportedModelsLookup = {\n // Amazon Nova models\n 'Amazon Nova Pro': 'amazon.nova-pro-v1:0',\n 'Amazon Nova Lite': 'amazon.nova-lite-v1:0',\n 'Amazon Nova Micro': 'amazon.nova-micro-v1:0',\n // Anthropic models\n 'Claude 3 Haiku': 'anthropic.claude-3-haiku-20240307-v1:0',\n 'Claude 3 Opus': 'anthropic.claude-3-opus-20240229-v1:0',\n 'Claude 3 Sonnet': 'anthropic.claude-3-sonnet-20240229-v1:0',\n 'Claude 3.5 Haiku': 'anthropic.claude-3-5-haiku-20241022-v1:0',\n 'Claude 3.5 Sonnet': 'anthropic.claude-3-5-sonnet-20240620-v1:0',\n 'Claude 3.5 Sonnet v2': 'anthropic.claude-3-5-sonnet-20241022-v2:0',\n // Cohere models\n 'Cohere Command R': 'cohere.command-r-v1:0',\n 'Cohere Command R+': 'cohere.command-r-plus-v1:0',\n // Meta models\n 'Llama 3.1 8B Instruct': 'meta.llama3-1-8b-instruct-v1:0',\n 'Llama 3.1 70B Instruct': 'meta.llama3-1-70b-instruct-v1:0',\n 'Llama 3.1 405B Instruct': 'meta.llama3-1-405b-instruct-v1:0',\n // Mistral AI models\n 'Mistral Large': 'mistral.mistral-large-2402-v1:0',\n 'Mistral Large 2': 'mistral.mistral-large-2407-v1:0',\n 'Mistral Small': 'mistral.mistral-small-2402-v1:0',\n};\n/**\n * Bedrock models currently supporting Converse API and Tool use\n * @see {@link https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features}\n */\nfunction model(modelName) {\n return {\n resourcePath: supportedModelsLookup[modelName],\n };\n}\nexports.model = model;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;AACvB,MAAM,qBAAqB,GAAG;AAC9B;AACA,IAAI,iBAAiB,EAAE,sBAAsB;AAC7C,IAAI,kBAAkB,EAAE,uBAAuB;AAC/C,IAAI,mBAAmB,EAAE,wBAAwB;AACjD;AACA,IAAI,gBAAgB,EAAE,wCAAwC;AAC9D,IAAI,eAAe,EAAE,uCAAuC;AAC5D,IAAI,iBAAiB,EAAE,yCAAyC;AAChE,IAAI,kBAAkB,EAAE,0CAA0C;AAClE,IAAI,mBAAmB,EAAE,2CAA2C;AACpE,IAAI,sBAAsB,EAAE,2CAA2C;AACvE;AACA,IAAI,kBAAkB,EAAE,uBAAuB;AAC/C,IAAI,mBAAmB,EAAE,4BAA4B;AACrD;AACA,IAAI,uBAAuB,EAAE,gCAAgC;AAC7D,IAAI,wBAAwB,EAAE,iCAAiC;AAC/D,IAAI,yBAAyB,EAAE,kCAAkC;AACjE;AACA,IAAI,eAAe,EAAE,iCAAiC;AACtD,IAAI,iBAAiB,EAAE,iCAAiC;AACxD,IAAI,eAAe,EAAE,iCAAiC;AACtD,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA,SAAS,KAAK,CAAC,SAAS,EAAE;AAC1B,IAAI,OAAO;AACX,QAAQ,YAAY,EAAE,qBAAqB,CAAC,SAAS,CAAC;AACtD,KAAK,CAAC;AACN,CAAC;AACD,OAAO,CAAC,KAAK,GAAG,KAAK;;"}
1
+ {"version":3,"file":"ModelType.js","sources":["../../../src/ai/ModelType.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.model = model;\nconst supportedModelsLookup = {\n // Amazon Nova models\n 'Amazon Nova Pro': 'amazon.nova-pro-v1:0',\n 'Amazon Nova Lite': 'amazon.nova-lite-v1:0',\n 'Amazon Nova Micro': 'amazon.nova-micro-v1:0',\n // Anthropic models\n 'Claude 3 Haiku': 'anthropic.claude-3-haiku-20240307-v1:0',\n 'Claude 3 Opus': 'anthropic.claude-3-opus-20240229-v1:0',\n 'Claude 3 Sonnet': 'anthropic.claude-3-sonnet-20240229-v1:0',\n 'Claude 3.5 Haiku': 'anthropic.claude-3-5-haiku-20241022-v1:0',\n 'Claude 3.5 Sonnet': 'anthropic.claude-3-5-sonnet-20240620-v1:0',\n 'Claude 3.5 Sonnet v2': 'anthropic.claude-3-5-sonnet-20241022-v2:0',\n // Cohere models\n 'Cohere Command R': 'cohere.command-r-v1:0',\n 'Cohere Command R+': 'cohere.command-r-plus-v1:0',\n // Meta models\n 'Llama 3.1 8B Instruct': 'meta.llama3-1-8b-instruct-v1:0',\n 'Llama 3.1 70B Instruct': 'meta.llama3-1-70b-instruct-v1:0',\n 'Llama 3.1 405B Instruct': 'meta.llama3-1-405b-instruct-v1:0',\n // Mistral AI models\n 'Mistral Large': 'mistral.mistral-large-2402-v1:0',\n 'Mistral Large 2': 'mistral.mistral-large-2407-v1:0',\n 'Mistral Small': 'mistral.mistral-small-2402-v1:0',\n};\n/**\n * Bedrock models currently supporting Converse API and Tool use\n * @see {@link https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features}\n */\nfunction model(modelName) {\n return {\n resourcePath: supportedModelsLookup[modelName],\n };\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,KAAK,GAAG,KAAK;AACrB,MAAM,qBAAqB,GAAG;AAC9B;AACA,IAAI,iBAAiB,EAAE,sBAAsB;AAC7C,IAAI,kBAAkB,EAAE,uBAAuB;AAC/C,IAAI,mBAAmB,EAAE,wBAAwB;AACjD;AACA,IAAI,gBAAgB,EAAE,wCAAwC;AAC9D,IAAI,eAAe,EAAE,uCAAuC;AAC5D,IAAI,iBAAiB,EAAE,yCAAyC;AAChE,IAAI,kBAAkB,EAAE,0CAA0C;AAClE,IAAI,mBAAmB,EAAE,2CAA2C;AACpE,IAAI,sBAAsB,EAAE,2CAA2C;AACvE;AACA,IAAI,kBAAkB,EAAE,uBAAuB;AAC/C,IAAI,mBAAmB,EAAE,4BAA4B;AACrD;AACA,IAAI,uBAAuB,EAAE,gCAAgC;AAC7D,IAAI,wBAAwB,EAAE,iCAAiC;AAC/D,IAAI,yBAAyB,EAAE,kCAAkC;AACjE;AACA,IAAI,eAAe,EAAE,iCAAiC;AACtD,IAAI,iBAAiB,EAAE,iCAAiC;AACxD,IAAI,eAAe,EAAE,iCAAiC;AACtD,CAAC;AACD;AACA;AACA;AACA;AACA,SAAS,KAAK,CAAC,SAAS,EAAE;AAC1B,IAAI,OAAO;AACX,QAAQ,YAAY,EAAE,qBAAqB,CAAC,SAAS,CAAC;AACtD,KAAK;AACL;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.a = void 0;\nconst tslib_1 = require(\"tslib\");\nconst a = tslib_1.__importStar(require(\"./a\"));\nexports.a = a;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;AACnB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/C,OAAO,CAAC,CAAC,GAAG,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.a = void 0;\nconst tslib_1 = require(\"tslib\");\nconst a = tslib_1.__importStar(require(\"./a\"));\nexports.a = a;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,CAAC,GAAG,MAAM;AAClB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9C,OAAO,CAAC,CAAC,GAAG,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/internals/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.configure = void 0;\nvar ModelSchema_1 = require(\"../ModelSchema\");\nObject.defineProperty(exports, \"configure\", { enumerable: true, get: function () { return ModelSchema_1.configure; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAC3B,IAAI,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC9C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/internals/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.configure = void 0;\nvar ModelSchema_1 = require(\"../ModelSchema\");\nObject.defineProperty(exports, \"configure\", { enumerable: true, get: function () { return ModelSchema_1.configure; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,IAAI,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAC7C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;;"}
@@ -3,7 +3,7 @@
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.addSchemaToClient = void 0;
6
+ exports.addSchemaToClient = addSchemaToClient;
7
7
  const internals_1 = require("./internals");
8
8
  function addSchemaToClient(client, apiGraphqlConfig, getInternals) {
9
9
  (0, internals_1.upgradeClientCancellation)(client);
@@ -16,5 +16,4 @@ function addSchemaToClient(client, apiGraphqlConfig, getInternals) {
16
16
  client.generations = (0, internals_1.generateGenerationsProperty)(client, apiGraphqlConfig, getInternals);
17
17
  return client;
18
18
  }
19
- exports.addSchemaToClient = addSchemaToClient;
20
19
  //# sourceMappingURL=addSchemaToClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addSchemaToClient.js","sources":["../../../src/runtime/addSchemaToClient.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.addSchemaToClient = void 0;\nconst internals_1 = require(\"./internals\");\nfunction addSchemaToClient(client, apiGraphqlConfig, getInternals) {\n (0, internals_1.upgradeClientCancellation)(client);\n client.models = (0, internals_1.generateModelsProperty)(client, apiGraphqlConfig, getInternals);\n client.enums = (0, internals_1.generateEnumsProperty)(apiGraphqlConfig);\n client.queries = (0, internals_1.generateCustomQueriesProperty)(client, apiGraphqlConfig, getInternals);\n client.mutations = (0, internals_1.generateCustomMutationsProperty)(client, apiGraphqlConfig, getInternals);\n client.subscriptions = (0, internals_1.generateCustomSubscriptionsProperty)(client, apiGraphqlConfig, getInternals);\n client.conversations = (0, internals_1.generateConversationsProperty)(client, apiGraphqlConfig, getInternals);\n client.generations = (0, internals_1.generateGenerationsProperty)(client, apiGraphqlConfig, getInternals);\n return client;\n}\nexports.addSchemaToClient = addSchemaToClient;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AACnC,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC3C,SAAS,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE;AACnE,IAAI,IAAI,WAAW,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;AACvD,IAAI,MAAM,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,sBAAsB,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AACpG,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,WAAW,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,CAAC;AAC5E,IAAI,MAAM,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAC5G,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,WAAW,CAAC,+BAA+B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAChH,IAAI,MAAM,CAAC,aAAa,GAAG,IAAI,WAAW,CAAC,mCAAmC,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AACxH,IAAI,MAAM,CAAC,aAAa,GAAG,IAAI,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAClH,IAAI,MAAM,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,2BAA2B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAC9G,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;;"}
1
+ {"version":3,"file":"addSchemaToClient.js","sources":["../../../src/runtime/addSchemaToClient.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.addSchemaToClient = addSchemaToClient;\nconst internals_1 = require(\"./internals\");\nfunction addSchemaToClient(client, apiGraphqlConfig, getInternals) {\n (0, internals_1.upgradeClientCancellation)(client);\n client.models = (0, internals_1.generateModelsProperty)(client, apiGraphqlConfig, getInternals);\n client.enums = (0, internals_1.generateEnumsProperty)(apiGraphqlConfig);\n client.queries = (0, internals_1.generateCustomQueriesProperty)(client, apiGraphqlConfig, getInternals);\n client.mutations = (0, internals_1.generateCustomMutationsProperty)(client, apiGraphqlConfig, getInternals);\n client.subscriptions = (0, internals_1.generateCustomSubscriptionsProperty)(client, apiGraphqlConfig, getInternals);\n client.conversations = (0, internals_1.generateConversationsProperty)(client, apiGraphqlConfig, getInternals);\n client.generations = (0, internals_1.generateGenerationsProperty)(client, apiGraphqlConfig, getInternals);\n return client;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C,SAAS,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE;AACnE,IAAI,IAAI,WAAW,CAAC,yBAAyB,EAAE,MAAM,CAAC;AACtD,IAAI,MAAM,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,sBAAsB,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AACnG,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,WAAW,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;AAC3E,IAAI,MAAM,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AAC3G,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,WAAW,CAAC,+BAA+B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AAC/G,IAAI,MAAM,CAAC,aAAa,GAAG,IAAI,WAAW,CAAC,mCAAmC,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AACvH,IAAI,MAAM,CAAC,aAAa,GAAG,IAAI,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AACjH,IAAI,MAAM,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,2BAA2B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AAC7G,IAAI,OAAO,MAAM;AACjB;;"}
@@ -3,7 +3,7 @@
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.addSchemaToClientWithInstance = void 0;
6
+ exports.addSchemaToClientWithInstance = addSchemaToClientWithInstance;
7
7
  const isApiGraphQLProviderConfig_1 = require("./internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig");
8
8
  const internals_1 = require("./internals");
9
9
  const server_1 = require("./internals/server");
@@ -19,5 +19,4 @@ function addSchemaToClientWithInstance(client, params, getInternals) {
19
19
  }
20
20
  return client;
21
21
  }
22
- exports.addSchemaToClientWithInstance = addSchemaToClientWithInstance;
23
22
  //# sourceMappingURL=addSchemaToClientWithInstance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addSchemaToClientWithInstance.js","sources":["../../../src/runtime/addSchemaToClientWithInstance.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.addSchemaToClientWithInstance = void 0;\nconst isApiGraphQLProviderConfig_1 = require(\"./internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig\");\nconst internals_1 = require(\"./internals\");\nconst server_1 = require(\"./internals/server\");\n// TODO: separate import path\nfunction addSchemaToClientWithInstance(client, params, getInternals) {\n const apiGraphqlConfig = params.config?.API?.GraphQL;\n if ((0, isApiGraphQLProviderConfig_1.isApiGraphQLConfig)(apiGraphqlConfig)) {\n (0, internals_1.upgradeClientCancellation)(client);\n client.models = (0, server_1.generateModelsProperty)(client, params, getInternals);\n client.enums = (0, internals_1.generateEnumsProperty)(apiGraphqlConfig);\n client.queries = (0, internals_1.generateCustomQueriesProperty)(client, apiGraphqlConfig, getInternals);\n client.mutations = (0, internals_1.generateCustomMutationsProperty)(client, apiGraphqlConfig, getInternals);\n }\n return client;\n}\nexports.addSchemaToClientWithInstance = addSchemaToClientWithInstance;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,6BAA6B,GAAG,KAAK,CAAC,CAAC;AAC/C,MAAM,4BAA4B,GAAG,OAAO,CAAC,gEAAgE,CAAC,CAAC;AAC/G,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC/C;AACA,SAAS,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE;AACrE,IAAI,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;AACzD,IAAI,IAAI,IAAI,4BAA4B,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EAAE;AAChF,QAAQ,IAAI,WAAW,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;AAC3D,QAAQ,MAAM,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAC3F,QAAQ,MAAM,CAAC,KAAK,GAAG,IAAI,WAAW,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,CAAC;AAChF,QAAQ,MAAM,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAChH,QAAQ,MAAM,CAAC,SAAS,GAAG,IAAI,WAAW,CAAC,+BAA+B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;AACpH,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,OAAO,CAAC,6BAA6B,GAAG,6BAA6B;;"}
1
+ {"version":3,"file":"addSchemaToClientWithInstance.js","sources":["../../../src/runtime/addSchemaToClientWithInstance.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.addSchemaToClientWithInstance = addSchemaToClientWithInstance;\nconst isApiGraphQLProviderConfig_1 = require(\"./internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig\");\nconst internals_1 = require(\"./internals\");\nconst server_1 = require(\"./internals/server\");\n// TODO: separate import path\nfunction addSchemaToClientWithInstance(client, params, getInternals) {\n const apiGraphqlConfig = params.config?.API?.GraphQL;\n if ((0, isApiGraphQLProviderConfig_1.isApiGraphQLConfig)(apiGraphqlConfig)) {\n (0, internals_1.upgradeClientCancellation)(client);\n client.models = (0, server_1.generateModelsProperty)(client, params, getInternals);\n client.enums = (0, internals_1.generateEnumsProperty)(apiGraphqlConfig);\n client.queries = (0, internals_1.generateCustomQueriesProperty)(client, apiGraphqlConfig, getInternals);\n client.mutations = (0, internals_1.generateCustomMutationsProperty)(client, apiGraphqlConfig, getInternals);\n }\n return client;\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,6BAA6B;AACrE,MAAM,4BAA4B,GAAG,OAAO,CAAC,gEAAgE,CAAC;AAC9G,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC;AAC9C;AACA,SAAS,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE;AACrE,IAAI,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO;AACxD,IAAI,IAAI,IAAI,4BAA4B,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EAAE;AAChF,QAAQ,IAAI,WAAW,CAAC,yBAAyB,EAAE,MAAM,CAAC;AAC1D,QAAQ,MAAM,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC;AAC1F,QAAQ,MAAM,CAAC,KAAK,GAAG,IAAI,WAAW,CAAC,qBAAqB,EAAE,gBAAgB,CAAC;AAC/E,QAAQ,MAAM,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AAC/G,QAAQ,MAAM,CAAC,SAAS,GAAG,IAAI,WAAW,CAAC,+BAA+B,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC;AACnH;AACA,IAAI,OAAO,MAAM;AACjB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"bridge-types.js","sources":["../../../src/runtime/bridge-types.ts"],"sourcesContent":["\"use strict\";\n/* eslint-disable @typescript-eslint/no-namespace */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGenConnectionType = void 0;\n/**\n * Field-level Relationship Definitions\n */\nvar CodeGenConnectionType;\n(function (CodeGenConnectionType) {\n CodeGenConnectionType[\"HAS_ONE\"] = \"HAS_ONE\";\n CodeGenConnectionType[\"BELONGS_TO\"] = \"BELONGS_TO\";\n CodeGenConnectionType[\"HAS_MANY\"] = \"HAS_MANY\";\n})(CodeGenConnectionType || (exports.CodeGenConnectionType = CodeGenConnectionType = {}));\n"],"names":[],"mappings":";;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC;AACA;AACA;AACA,IAAI,qBAAqB,CAAC;AAC1B,CAAC,UAAU,qBAAqB,EAAE;AAClC,IAAI,qBAAqB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AACjD,IAAI,qBAAqB,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;AACvD,IAAI,qBAAqB,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACnD,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,GAAG,qBAAqB,GAAG,EAAE,CAAC,CAAC;;"}
1
+ {"version":3,"file":"bridge-types.js","sources":["../../../src/runtime/bridge-types.ts"],"sourcesContent":["\"use strict\";\n/* eslint-disable @typescript-eslint/no-namespace */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGenConnectionType = void 0;\n/**\n * Field-level Relationship Definitions\n */\nvar CodeGenConnectionType;\n(function (CodeGenConnectionType) {\n CodeGenConnectionType[\"HAS_ONE\"] = \"HAS_ONE\";\n CodeGenConnectionType[\"BELONGS_TO\"] = \"BELONGS_TO\";\n CodeGenConnectionType[\"HAS_MANY\"] = \"HAS_MANY\";\n})(CodeGenConnectionType || (exports.CodeGenConnectionType = CodeGenConnectionType = {}));\n"],"names":[],"mappings":";;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,MAAM;AACtC;AACA;AACA;AACA,IAAI,qBAAqB;AACzB,CAAC,UAAU,qBAAqB,EAAE;AAClC,IAAI,qBAAqB,CAAC,SAAS,CAAC,GAAG,SAAS;AAChD,IAAI,qBAAqB,CAAC,YAAY,CAAC,GAAG,YAAY;AACtD,IAAI,qBAAqB,CAAC,UAAU,CAAC,GAAG,UAAU;AAClD,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,qBAAqB,GAAG,qBAAqB,GAAG,EAAE,CAAC,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/runtime/client/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.__modelMeta__ = void 0;\n// temporarily export symbols from `data-schema-types` because in case part of the\n// problem with the runtime -> data-schema migration comes down to a mismatch\n// around this symbol and it's extractor.\n//\n// before switching to declare these here, we need to prove it won't break any\n// customer experiences. this *might* need to happen as a breaking change.\n//\n// export declare const __modelMeta__: unique symbol;\n// export type ExtractModelMeta<T extends Record<any, any>> =\n// T[typeof __modelMeta__];\nvar data_schema_types_1 = require(\"@aws-amplify/data-schema-types\");\nObject.defineProperty(exports, \"__modelMeta__\", { enumerable: true, get: function () { return data_schema_types_1.__modelMeta__; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAmB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/runtime/client/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.__modelMeta__ = void 0;\n// temporarily export symbols from `data-schema-types` because in case part of the\n// problem with the runtime -> data-schema migration comes down to a mismatch\n// around this symbol and it's extractor.\n//\n// before switching to declare these here, we need to prove it won't break any\n// customer experiences. this *might* need to happen as a breaking change.\n//\n// export declare const __modelMeta__: unique symbol;\n// export type ExtractModelMeta<T extends Record<any, any>> =\n// T[typeof __modelMeta__];\nvar data_schema_types_1 = require(\"@aws-amplify/data-schema-types\");\nObject.defineProperty(exports, \"__modelMeta__\", { enumerable: true, get: function () { return data_schema_types_1.__modelMeta__; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAmB,GAAG,OAAO,CAAC,gCAAgC,CAAC;AACnE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.v3.js","sources":["../../../../src/runtime/client/index.v3.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.__modelMeta__ = void 0;\nvar data_schema_types_1 = require(\"@aws-amplify/data-schema-types\");\nObject.defineProperty(exports, \"__modelMeta__\", { enumerable: true, get: function () { return data_schema_types_1.__modelMeta__; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,IAAI,mBAAmB,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AACpE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.v3.js","sources":["../../../../src/runtime/client/index.v3.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.__modelMeta__ = void 0;\nvar data_schema_types_1 = require(\"@aws-amplify/data-schema-types\");\nObject.defineProperty(exports, \"__modelMeta__\", { enumerable: true, get: function () { return data_schema_types_1.__modelMeta__; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,MAAM;AAC9B,IAAI,mBAAmB,GAAG,OAAO,CAAC,gCAAgC,CAAC;AACnE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/runtime/index.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.INTERNAL_USER_AGENT_OVERRIDE = exports.addSchemaToClientWithInstance = exports.addSchemaToClient = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./client\"), exports);\nvar addSchemaToClient_1 = require(\"./addSchemaToClient\");\nObject.defineProperty(exports, \"addSchemaToClient\", { enumerable: true, get: function () { return addSchemaToClient_1.addSchemaToClient; } });\nvar addSchemaToClientWithInstance_1 = require(\"./addSchemaToClientWithInstance\");\nObject.defineProperty(exports, \"addSchemaToClientWithInstance\", { enumerable: true, get: function () { return addSchemaToClientWithInstance_1.addSchemaToClientWithInstance; } });\nvar getCustomUserAgentDetails_1 = require(\"./internals/ai/getCustomUserAgentDetails\");\nObject.defineProperty(exports, \"INTERNAL_USER_AGENT_OVERRIDE\", { enumerable: true, get: function () { return getCustomUserAgentDetails_1.INTERNAL_USER_AGENT_OVERRIDE; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,4BAA4B,GAAG,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AAClH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,IAAI,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACzD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9I,IAAI,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;AACjF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC,CAAC;AAClL,IAAI,2BAA2B,GAAG,OAAO,CAAC,0CAA0C,CAAC,CAAC;AACtF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,8BAA8B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,2BAA2B,CAAC,4BAA4B,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/runtime/index.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.INTERNAL_USER_AGENT_OVERRIDE = exports.addSchemaToClientWithInstance = exports.addSchemaToClient = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./client\"), exports);\nvar addSchemaToClient_1 = require(\"./addSchemaToClient\");\nObject.defineProperty(exports, \"addSchemaToClient\", { enumerable: true, get: function () { return addSchemaToClient_1.addSchemaToClient; } });\nvar addSchemaToClientWithInstance_1 = require(\"./addSchemaToClientWithInstance\");\nObject.defineProperty(exports, \"addSchemaToClientWithInstance\", { enumerable: true, get: function () { return addSchemaToClientWithInstance_1.addSchemaToClientWithInstance; } });\nvar getCustomUserAgentDetails_1 = require(\"./internals/ai/getCustomUserAgentDetails\");\nObject.defineProperty(exports, \"INTERNAL_USER_AGENT_OVERRIDE\", { enumerable: true, get: function () { return getCustomUserAgentDetails_1.INTERNAL_USER_AGENT_OVERRIDE; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,4BAA4B,GAAG,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,iBAAiB,GAAG,MAAM;AACjH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;AAClD,IAAI,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;AACxD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC;AAC7I,IAAI,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAChF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC;AACjL,IAAI,2BAA2B,GAAG,OAAO,CAAC,0CAA0C,CAAC;AACrF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,8BAA8B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,2BAA2B,CAAC,4BAA4B,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.v3.js","sources":["../../../src/runtime/index.v3.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 });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./client/index.v3\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;;"}
1
+ {"version":3,"file":"index.v3.js","sources":["../../../src/runtime/index.v3.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 });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./client/index.v3\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AAChC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;;"}
@@ -2,7 +2,16 @@
2
2
 
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getCustomHeaders = exports.authModeParams = exports.normalizeMutationInput = exports.buildGraphQLVariables = exports.generateGraphQLDocument = exports.generateSelectionSet = exports.selectionSetIRToString = exports.customSelectionSetToIR = exports.getDefaultSelectionSetForNonModelWithIR = exports.graphQLOperationsInfo = exports.initializeModel = exports.flattenItems = void 0;
5
+ exports.getDefaultSelectionSetForNonModelWithIR = exports.graphQLOperationsInfo = exports.flattenItems = void 0;
6
+ exports.initializeModel = initializeModel;
7
+ exports.customSelectionSetToIR = customSelectionSetToIR;
8
+ exports.selectionSetIRToString = selectionSetIRToString;
9
+ exports.generateSelectionSet = generateSelectionSet;
10
+ exports.generateGraphQLDocument = generateGraphQLDocument;
11
+ exports.buildGraphQLVariables = buildGraphQLVariables;
12
+ exports.normalizeMutationInput = normalizeMutationInput;
13
+ exports.authModeParams = authModeParams;
14
+ exports.getCustomHeaders = getCustomHeaders;
6
15
  const utils_1 = require("../utils");
7
16
  const cancellation_1 = require("./cancellation");
8
17
  const connectionType = {
@@ -335,7 +344,6 @@ function initializeModel(client, modelName, result, modelIntrospection, authMode
335
344
  return { ...record, ...initializedRelationshipFields };
336
345
  });
337
346
  }
338
- exports.initializeModel = initializeModel;
339
347
  exports.graphQLOperationsInfo = {
340
348
  CREATE: { operationPrefix: 'create', usePlural: false },
341
349
  GET: { operationPrefix: 'get', usePlural: false },
@@ -517,7 +525,6 @@ function customSelectionSetToIR(modelIntrospection, modelName, selectionSet) {
517
525
  };
518
526
  return selectionSet.reduce((resultObj, path) => deepMergeSelectionSetObjects(dotNotationToObject(path, modelName), resultObj), {});
519
527
  }
520
- exports.customSelectionSetToIR = customSelectionSetToIR;
521
528
  /**
522
529
  * Stringifies selection set IR
523
530
  * * @example
@@ -550,7 +557,6 @@ function selectionSetIRToString(obj) {
550
557
  });
551
558
  return res.join(' ');
552
559
  }
553
- exports.selectionSetIRToString = selectionSetIRToString;
554
560
  /**
555
561
  * Recursively merges selection set objects from `source` onto `target`.
556
562
  *
@@ -581,7 +587,6 @@ function generateSelectionSet(modelIntrospection, modelName, selectionSet) {
581
587
  const selSetString = selectionSetIRToString(selSetIr);
582
588
  return selSetString;
583
589
  }
584
- exports.generateSelectionSet = generateSelectionSet;
585
590
  function generateGraphQLDocument(modelIntrospection, modelDefinition, modelOperation, listArgs, indexMeta) {
586
591
  const { name, pluralName, fields, primaryKeyInfo: { isCustomPrimaryKey, primaryKeyFieldName, sortKeyFieldNames, }, attributes, } = modelDefinition;
587
592
  // Use pascal case of the model name to generate the operations and the arguments.
@@ -787,7 +792,6 @@ function generateGraphQLDocument(modelIntrospection, modelDefinition, modelOpera
787
792
  : ''} { ${graphQLSelectionSet} } }`;
788
793
  return graphQLDocument;
789
794
  }
790
- exports.generateGraphQLDocument = generateGraphQLDocument;
791
795
  function buildGraphQLVariables(modelDefinition, operation, arg, modelIntrospection, indexMeta) {
792
796
  const { fields, primaryKeyInfo: { isCustomPrimaryKey, primaryKeyFieldName, sortKeyFieldNames, }, } = modelDefinition;
793
797
  const skName = sortKeyFieldNames?.length && resolvedSkName(sortKeyFieldNames);
@@ -884,7 +888,6 @@ function buildGraphQLVariables(modelDefinition, operation, arg, modelIntrospecti
884
888
  }
885
889
  return variables;
886
890
  }
887
- exports.buildGraphQLVariables = buildGraphQLVariables;
888
891
  /**
889
892
  * Iterates over mutation input values and resolves any model inputs to their corresponding join fields/values
890
893
  *
@@ -936,7 +939,6 @@ function normalizeMutationInput(mutationInput, model, modelIntrospection) {
936
939
  });
937
940
  return normalized;
938
941
  }
939
- exports.normalizeMutationInput = normalizeMutationInput;
940
942
  /**
941
943
  * Produces a parameter object that can contains auth mode/token overrides
942
944
  * only if present in either `options` (first) or configured on the `client`
@@ -953,7 +955,6 @@ function authModeParams(client, getInternals, options = {}) {
953
955
  authToken: options.authToken || internals.authToken,
954
956
  };
955
957
  }
956
- exports.authModeParams = authModeParams;
957
958
  /**
958
959
  * Retrieves custom headers from either the client or request options.
959
960
  * @param client V6Client | V6ClientSSRRequest | V6ClientSSRCookies - for extracting client headers
@@ -969,5 +970,4 @@ function getCustomHeaders(client, getInternals, requestHeaders) {
969
970
  }
970
971
  return headers;
971
972
  }
972
- exports.getCustomHeaders = getCustomHeaders;
973
973
  //# sourceMappingURL=APIClient.js.map