@aws-amplify/data-schema 0.15.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{lib-esm/src → dist/cjs}/Authorization.js +149 -31
- package/dist/cjs/Authorization.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/ClientSchema.js +3 -1
- package/dist/cjs/ClientSchema.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/CombineSchema.js +3 -2
- package/dist/cjs/CombineSchema.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/CustomOperation.js +7 -3
- package/dist/cjs/CustomOperation.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/CustomType.js +3 -1
- package/dist/cjs/CustomType.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/EnumType.js +3 -1
- package/dist/cjs/EnumType.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/Handler.js +3 -1
- package/dist/cjs/Handler.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/MappedTypes/CustomOperations.js +3 -1
- package/dist/cjs/MappedTypes/CustomOperations.js.map +1 -0
- package/dist/cjs/MappedTypes/ExtractNonModelTypes.js +4 -0
- package/dist/cjs/MappedTypes/ExtractNonModelTypes.js.map +1 -0
- package/dist/cjs/MappedTypes/ImplicitFieldInjector.js +4 -0
- package/dist/cjs/MappedTypes/ImplicitFieldInjector.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/MappedTypes/MapSecondaryIndexes.js +3 -1
- package/dist/cjs/MappedTypes/MapSecondaryIndexes.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/MappedTypes/ModelMetadata.js +3 -1
- package/dist/cjs/MappedTypes/ModelMetadata.js.map +1 -0
- package/dist/cjs/MappedTypes/ResolveFieldProperties.js +4 -0
- package/dist/cjs/MappedTypes/ResolveFieldProperties.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/MappedTypes/ResolveSchema.js +3 -1
- package/dist/cjs/MappedTypes/ResolveSchema.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/ModelField.js +8 -3
- package/dist/cjs/ModelField.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/ModelIndex.js +3 -1
- package/dist/cjs/ModelIndex.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/ModelRelationalField.js +7 -10
- package/dist/cjs/ModelRelationalField.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/ModelSchema.js +10 -5
- package/dist/cjs/ModelSchema.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/ModelType.js +8 -3
- package/dist/cjs/ModelType.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/RefType.js +8 -5
- package/dist/cjs/RefType.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/SchemaProcessor.js +15 -61
- package/dist/cjs/SchemaProcessor.js.map +1 -0
- package/{lib-esm/src/index.js → dist/cjs/a.js} +4 -4
- package/dist/cjs/a.js.map +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/internals/index.js +3 -1
- package/dist/cjs/internals/index.js.map +1 -0
- package/dist/cjs/runtime/addSchemaToClient.js +17 -0
- package/dist/cjs/runtime/addSchemaToClient.js.map +1 -0
- package/dist/cjs/runtime/addSchemaToClientWithInstance.js +22 -0
- package/dist/cjs/runtime/addSchemaToClientWithInstance.js.map +1 -0
- package/dist/cjs/runtime/bridge-types.js +15 -0
- package/dist/cjs/runtime/bridge-types.js.map +1 -0
- package/dist/cjs/runtime/client/index.js +17 -0
- package/dist/cjs/runtime/client/index.js.map +1 -0
- package/dist/cjs/runtime/client/index.v3.js +7 -0
- package/dist/cjs/runtime/client/index.v3.js.map +1 -0
- package/dist/cjs/runtime/index.js +13 -0
- package/dist/cjs/runtime/index.js.map +1 -0
- package/dist/cjs/runtime/index.v3.js +8 -0
- package/dist/cjs/runtime/index.v3.js.map +1 -0
- package/dist/cjs/runtime/internals/APIClient.js +740 -0
- package/dist/cjs/runtime/internals/APIClient.js.map +1 -0
- package/dist/cjs/runtime/internals/clientUtils.js +29 -0
- package/dist/cjs/runtime/internals/clientUtils.js.map +1 -0
- package/dist/cjs/runtime/internals/generateCustomOperationsProperty.js +49 -0
- package/dist/cjs/runtime/internals/generateCustomOperationsProperty.js.map +1 -0
- package/dist/cjs/runtime/internals/index.js +21 -0
- package/dist/cjs/runtime/internals/index.js.map +1 -0
- package/dist/cjs/runtime/internals/operations/custom.js +356 -0
- package/dist/cjs/runtime/internals/operations/custom.js.map +1 -0
- package/dist/cjs/runtime/internals/operations/get.js +62 -0
- package/dist/cjs/runtime/internals/operations/get.js.map +1 -0
- package/dist/cjs/runtime/internals/operations/indexQuery.js +75 -0
- package/dist/cjs/runtime/internals/operations/indexQuery.js.map +1 -0
- package/dist/cjs/runtime/internals/operations/list.js +74 -0
- package/dist/cjs/runtime/internals/operations/list.js.map +1 -0
- package/dist/cjs/runtime/internals/operations/observeQuery.js +121 -0
- package/dist/cjs/runtime/internals/operations/observeQuery.js.map +1 -0
- package/dist/cjs/runtime/internals/operations/subscription.js +31 -0
- package/dist/cjs/runtime/internals/operations/subscription.js.map +1 -0
- package/dist/cjs/runtime/internals/server/generateModelsProperty.js +53 -0
- package/dist/cjs/runtime/internals/server/generateModelsProperty.js.map +1 -0
- package/dist/cjs/runtime/internals/server/index.js +8 -0
- package/dist/cjs/runtime/internals/server/index.js.map +1 -0
- package/dist/cjs/runtime/internals/utils/clientProperties/generateEnumsProperty.js +21 -0
- package/dist/cjs/runtime/internals/utils/clientProperties/generateEnumsProperty.js.map +1 -0
- package/dist/cjs/runtime/internals/utils/clientProperties/generateModelsProperty.js +45 -0
- package/dist/cjs/runtime/internals/utils/clientProperties/generateModelsProperty.js.map +1 -0
- package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.js +11 -0
- package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.js.map +1 -0
- package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.js +11 -0
- package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.js.map +1 -0
- package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.js +15 -0
- package/dist/cjs/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.js.map +1 -0
- package/dist/cjs/runtime/utils/findIndexByFields.js +25 -0
- package/dist/cjs/runtime/utils/findIndexByFields.js.map +1 -0
- package/dist/cjs/runtime/utils/index.js +11 -0
- package/dist/cjs/runtime/utils/index.js.map +1 -0
- package/dist/cjs/runtime/utils/resolveOwnerFields.js +48 -0
- package/dist/cjs/runtime/utils/resolveOwnerFields.js.map +1 -0
- package/dist/cjs/runtime/utils/resolvePKFields.js +17 -0
- package/dist/cjs/runtime/utils/resolvePKFields.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/util/Brand.js +3 -1
- package/dist/cjs/util/Brand.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/util/IndexLimit.js +3 -1
- package/dist/cjs/util/IndexLimit.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/util/SpreadTuple.js +3 -1
- package/dist/cjs/util/SpreadTuple.js.map +1 -0
- package/{lib-esm/src → dist/cjs}/util/index.js +3 -1
- package/dist/cjs/util/index.js.map +1 -0
- package/{lib-esm/src → dist/esm}/Authorization.d.ts +105 -31
- package/dist/esm/Authorization.mjs +446 -0
- package/dist/esm/Authorization.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/ClientSchema.d.ts +1 -2
- package/dist/esm/ClientSchema.mjs +2 -0
- package/dist/esm/ClientSchema.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/CombineSchema.d.ts +0 -1
- package/dist/esm/CombineSchema.mjs +39 -0
- package/dist/esm/CombineSchema.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/CustomOperation.d.ts +2 -3
- package/dist/esm/CustomOperation.mjs +67 -0
- package/dist/esm/CustomOperation.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/CustomType.d.ts +0 -1
- package/dist/esm/CustomType.mjs +13 -0
- package/dist/esm/CustomType.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/EnumType.d.ts +0 -1
- package/dist/esm/EnumType.mjs +16 -0
- package/dist/esm/EnumType.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/Handler.d.ts +0 -1
- package/dist/esm/Handler.mjs +48 -0
- package/dist/esm/Handler.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/CustomOperations.d.ts +0 -1
- package/dist/esm/MappedTypes/CustomOperations.mjs +2 -0
- package/dist/esm/MappedTypes/CustomOperations.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/ExtractNonModelTypes.d.ts +0 -1
- package/dist/esm/MappedTypes/ExtractNonModelTypes.mjs +2 -0
- package/dist/esm/MappedTypes/ExtractNonModelTypes.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/ImplicitFieldInjector.d.ts +0 -1
- package/dist/esm/MappedTypes/ImplicitFieldInjector.mjs +2 -0
- package/dist/esm/MappedTypes/ImplicitFieldInjector.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/MapSecondaryIndexes.d.ts +0 -1
- package/dist/esm/MappedTypes/MapSecondaryIndexes.mjs +2 -0
- package/dist/esm/MappedTypes/MapSecondaryIndexes.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/ModelMetadata.d.ts +0 -1
- package/dist/esm/MappedTypes/ModelMetadata.mjs +2 -0
- package/dist/esm/MappedTypes/ModelMetadata.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/ResolveFieldProperties.d.ts +0 -1
- package/dist/esm/MappedTypes/ResolveFieldProperties.mjs +2 -0
- package/dist/esm/MappedTypes/ResolveFieldProperties.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/MappedTypes/ResolveSchema.d.ts +0 -1
- package/dist/esm/MappedTypes/ResolveSchema.mjs +2 -0
- package/dist/esm/MappedTypes/ResolveSchema.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/ModelField.d.ts +2 -3
- package/dist/esm/ModelField.mjs +199 -0
- package/dist/esm/ModelField.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/ModelIndex.d.ts +0 -1
- package/dist/esm/ModelIndex.mjs +33 -0
- package/dist/esm/ModelIndex.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/ModelRelationalField.d.ts +3 -4
- package/dist/esm/ModelRelationalField.mjs +88 -0
- package/dist/esm/ModelRelationalField.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/ModelSchema.d.ts +3 -4
- package/dist/esm/ModelSchema.mjs +163 -0
- package/dist/esm/ModelSchema.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/ModelType.d.ts +2 -3
- package/dist/esm/ModelType.mjs +66 -0
- package/dist/esm/ModelType.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/RefType.d.ts +2 -3
- package/dist/esm/RefType.mjs +48 -0
- package/dist/esm/RefType.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/SchemaProcessor.d.ts +0 -1
- package/dist/esm/SchemaProcessor.mjs +926 -0
- package/dist/esm/SchemaProcessor.mjs.map +1 -0
- package/{lib-esm/src/index.d.ts → dist/esm/a.d.ts} +1 -3
- package/dist/esm/a.mjs +11 -0
- package/dist/esm/a.mjs.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/internals/index.d.ts +2 -0
- package/dist/esm/internals/index.mjs +2 -0
- package/dist/esm/internals/index.mjs.map +1 -0
- package/dist/esm/runtime/addSchemaToClient.d.ts +3 -0
- package/dist/esm/runtime/addSchemaToClient.mjs +17 -0
- package/dist/esm/runtime/addSchemaToClient.mjs.map +1 -0
- package/dist/esm/runtime/addSchemaToClientWithInstance.d.ts +3 -0
- package/dist/esm/runtime/addSchemaToClientWithInstance.mjs +22 -0
- package/dist/esm/runtime/addSchemaToClientWithInstance.mjs.map +1 -0
- package/dist/esm/runtime/bridge-types.d.ts +281 -0
- package/dist/esm/runtime/bridge-types.mjs +13 -0
- package/dist/esm/runtime/bridge-types.mjs.map +1 -0
- package/dist/esm/runtime/client/index.d.ts +571 -0
- package/dist/esm/runtime/client/index.mjs +2 -0
- package/dist/esm/runtime/client/index.mjs.map +1 -0
- package/dist/esm/runtime/client/index.v3.d.ts +55 -0
- package/dist/esm/runtime/client/index.v3.mjs +2 -0
- package/dist/esm/runtime/client/index.v3.mjs.map +1 -0
- package/dist/esm/runtime/index.d.ts +4 -0
- package/dist/esm/runtime/index.mjs +4 -0
- package/dist/esm/runtime/index.mjs.map +1 -0
- package/dist/esm/runtime/index.v3.d.ts +3 -0
- package/dist/esm/runtime/index.v3.mjs +2 -0
- package/dist/esm/runtime/index.v3.mjs.map +1 -0
- package/dist/esm/runtime/internals/APIClient.d.ts +125 -0
- package/dist/esm/runtime/internals/APIClient.mjs +728 -0
- package/dist/esm/runtime/internals/APIClient.mjs.map +1 -0
- package/dist/esm/runtime/internals/clientUtils.d.ts +6 -0
- package/dist/esm/runtime/internals/clientUtils.mjs +26 -0
- package/dist/esm/runtime/internals/clientUtils.mjs.map +1 -0
- package/dist/esm/runtime/internals/generateCustomOperationsProperty.d.ts +8 -0
- package/dist/esm/runtime/internals/generateCustomOperationsProperty.mjs +44 -0
- package/dist/esm/runtime/internals/generateCustomOperationsProperty.mjs.map +1 -0
- package/dist/esm/runtime/internals/index.d.ts +6 -0
- package/dist/esm/runtime/internals/index.mjs +7 -0
- package/dist/esm/runtime/internals/index.mjs.map +1 -0
- package/dist/esm/runtime/internals/operations/custom.d.ts +61 -0
- package/dist/esm/runtime/internals/operations/custom.mjs +354 -0
- package/dist/esm/runtime/internals/operations/custom.mjs.map +1 -0
- package/dist/esm/runtime/internals/operations/get.d.ts +3 -0
- package/dist/esm/runtime/internals/operations/get.mjs +60 -0
- package/dist/esm/runtime/internals/operations/get.mjs.map +1 -0
- package/dist/esm/runtime/internals/operations/indexQuery.d.ts +7 -0
- package/dist/esm/runtime/internals/operations/indexQuery.mjs +73 -0
- package/dist/esm/runtime/internals/operations/indexQuery.mjs.map +1 -0
- package/dist/esm/runtime/internals/operations/list.d.ts +2 -0
- package/dist/esm/runtime/internals/operations/list.mjs +72 -0
- package/dist/esm/runtime/internals/operations/list.mjs.map +1 -0
- package/dist/esm/runtime/internals/operations/observeQuery.d.ts +3 -0
- package/dist/esm/runtime/internals/operations/observeQuery.mjs +120 -0
- package/dist/esm/runtime/internals/operations/observeQuery.mjs.map +1 -0
- package/dist/esm/runtime/internals/operations/subscription.d.ts +3 -0
- package/dist/esm/runtime/internals/operations/subscription.mjs +29 -0
- package/dist/esm/runtime/internals/operations/subscription.mjs.map +1 -0
- package/dist/esm/runtime/internals/server/generateModelsProperty.d.ts +3 -0
- package/dist/esm/runtime/internals/server/generateModelsProperty.mjs +51 -0
- package/dist/esm/runtime/internals/server/generateModelsProperty.mjs.map +1 -0
- package/dist/esm/runtime/internals/server/index.d.ts +1 -0
- package/dist/esm/runtime/internals/server/index.mjs +2 -0
- package/dist/esm/runtime/internals/server/index.mjs.map +1 -0
- package/dist/esm/runtime/internals/utils/clientProperties/generateEnumsProperty.d.ts +3 -0
- package/dist/esm/runtime/internals/utils/clientProperties/generateEnumsProperty.mjs +18 -0
- package/dist/esm/runtime/internals/utils/clientProperties/generateEnumsProperty.mjs.map +1 -0
- package/dist/esm/runtime/internals/utils/clientProperties/generateModelsProperty.d.ts +3 -0
- package/dist/esm/runtime/internals/utils/clientProperties/generateModelsProperty.mjs +43 -0
- package/dist/esm/runtime/internals/utils/clientProperties/generateModelsProperty.mjs.map +1 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.d.ts +2 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs +8 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs.map +1 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.d.ts +8 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs +8 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs.map +1 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.d.ts +2 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs +12 -0
- package/dist/esm/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs.map +1 -0
- package/dist/esm/runtime/utils/findIndexByFields.d.ts +9 -0
- package/dist/esm/runtime/utils/findIndexByFields.mjs +22 -0
- package/dist/esm/runtime/utils/findIndexByFields.mjs.map +1 -0
- package/dist/esm/runtime/utils/index.d.ts +2 -0
- package/dist/esm/runtime/utils/index.mjs +3 -0
- package/dist/esm/runtime/utils/index.mjs.map +1 -0
- package/dist/esm/runtime/utils/resolveOwnerFields.d.ts +12 -0
- package/dist/esm/runtime/utils/resolveOwnerFields.mjs +45 -0
- package/dist/esm/runtime/utils/resolveOwnerFields.mjs.map +1 -0
- package/dist/esm/runtime/utils/resolvePKFields.d.ts +13 -0
- package/dist/esm/runtime/utils/resolvePKFields.mjs +14 -0
- package/dist/esm/runtime/utils/resolvePKFields.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/util/Brand.d.ts +0 -1
- package/dist/esm/util/Brand.mjs +30 -0
- package/dist/esm/util/Brand.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/util/IndexLimit.d.ts +0 -1
- package/dist/esm/util/IndexLimit.mjs +2 -0
- package/dist/esm/util/IndexLimit.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/util/SpreadTuple.d.ts +0 -1
- package/dist/esm/util/SpreadTuple.mjs +2 -0
- package/dist/esm/util/SpreadTuple.mjs.map +1 -0
- package/{lib-esm/src → dist/esm}/util/index.d.ts +0 -1
- package/dist/esm/util/index.mjs +2 -0
- package/dist/esm/util/index.mjs.map +1 -0
- package/dist/meta/cjs.tsbuildinfo +1 -0
- package/internals/package.json +7 -5
- package/package.json +32 -14
- package/runtime/package.json +20 -0
- package/src/Authorization.ts +684 -0
- package/src/ClientSchema.ts +118 -0
- package/src/CombineSchema.ts +58 -0
- package/src/CustomOperation.ts +286 -0
- package/src/CustomType.ts +67 -0
- package/src/EnumType.ts +36 -0
- package/src/Handler.ts +127 -0
- package/src/MappedTypes/CustomOperations.ts +256 -0
- package/src/MappedTypes/ExtractNonModelTypes.ts +154 -0
- package/src/MappedTypes/ImplicitFieldInjector.ts +69 -0
- package/src/MappedTypes/MapSecondaryIndexes.ts +100 -0
- package/src/MappedTypes/ModelMetadata.ts +87 -0
- package/src/MappedTypes/ResolveFieldProperties.ts +254 -0
- package/src/MappedTypes/ResolveSchema.ts +148 -0
- package/src/ModelField.ts +304 -0
- package/src/ModelIndex.ts +91 -0
- package/src/ModelRelationalField.ts +263 -0
- package/src/ModelSchema.ts +437 -0
- package/src/ModelType.ts +345 -0
- package/src/RefType.ts +139 -0
- package/src/SchemaProcessor.ts +1516 -0
- package/src/a.ts +58 -0
- package/src/index.ts +6 -0
- package/src/internals/index.ts +2 -0
- package/src/runtime/addSchemaToClient.ts +45 -0
- package/src/runtime/addSchemaToClientWithInstance.ts +46 -0
- package/src/runtime/bridge-types.ts +382 -0
- package/src/runtime/client/index.ts +923 -0
- package/src/runtime/client/index.v3.ts +98 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/index.v3.ts +12 -0
- package/src/runtime/internals/APIClient.ts +1082 -0
- package/src/runtime/internals/clientUtils.ts +37 -0
- package/src/runtime/internals/generateCustomOperationsProperty.ts +116 -0
- package/src/runtime/internals/index.ts +12 -0
- package/src/runtime/internals/operations/custom.ts +497 -0
- package/src/runtime/internals/operations/get.ts +150 -0
- package/src/runtime/internals/operations/indexQuery.ts +178 -0
- package/src/runtime/internals/operations/list.ts +143 -0
- package/src/runtime/internals/operations/observeQuery.ts +146 -0
- package/src/runtime/internals/operations/subscription.ts +78 -0
- package/src/runtime/internals/server/generateModelsProperty.ts +94 -0
- package/src/runtime/internals/server/index.ts +4 -0
- package/src/runtime/internals/utils/clientProperties/generateEnumsProperty.ts +34 -0
- package/src/runtime/internals/utils/clientProperties/generateModelsProperty.ts +88 -0
- package/src/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.ts +10 -0
- package/src/runtime/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.ts +13 -0
- package/src/runtime/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.ts +15 -0
- package/src/runtime/utils/findIndexByFields.ts +31 -0
- package/src/runtime/utils/index.ts +5 -0
- package/src/runtime/utils/resolveOwnerFields.ts +77 -0
- package/src/runtime/utils/resolvePKFields.ts +23 -0
- package/src/util/Brand.ts +45 -0
- package/src/util/IndexLimit.ts +12 -0
- package/src/util/SpreadTuple.ts +10 -0
- package/src/util/index.ts +3 -0
- package/lib-esm/index.d.ts +0 -5
- package/lib-esm/index.d.ts.map +0 -1
- package/lib-esm/index.js +0 -28
- package/lib-esm/src/Authorization.d.ts.map +0 -1
- package/lib-esm/src/ClientSchema.d.ts.map +0 -1
- package/lib-esm/src/CombineSchema.d.ts.map +0 -1
- package/lib-esm/src/CustomOperation.d.ts.map +0 -1
- package/lib-esm/src/CustomType.d.ts.map +0 -1
- package/lib-esm/src/EnumType.d.ts.map +0 -1
- package/lib-esm/src/Handler.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/CustomOperations.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/ExtractNonModelTypes.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/ExtractNonModelTypes.js +0 -2
- package/lib-esm/src/MappedTypes/ImplicitFieldInjector.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/ImplicitFieldInjector.js +0 -2
- package/lib-esm/src/MappedTypes/MapSecondaryIndexes.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/ModelMetadata.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/ResolveFieldProperties.d.ts.map +0 -1
- package/lib-esm/src/MappedTypes/ResolveFieldProperties.js +0 -2
- package/lib-esm/src/MappedTypes/ResolveSchema.d.ts.map +0 -1
- package/lib-esm/src/ModelField.d.ts.map +0 -1
- package/lib-esm/src/ModelIndex.d.ts.map +0 -1
- package/lib-esm/src/ModelRelationalField.d.ts.map +0 -1
- package/lib-esm/src/ModelSchema.d.ts.map +0 -1
- package/lib-esm/src/ModelType.d.ts.map +0 -1
- package/lib-esm/src/RefType.d.ts.map +0 -1
- package/lib-esm/src/SchemaProcessor.d.ts.map +0 -1
- package/lib-esm/src/index.d.ts.map +0 -1
- package/lib-esm/src/internals/index.d.ts +0 -2
- package/lib-esm/src/internals/index.d.ts.map +0 -1
- package/lib-esm/src/util/Brand.d.ts.map +0 -1
- package/lib-esm/src/util/IndexLimit.d.ts.map +0 -1
- package/lib-esm/src/util/SpreadTuple.d.ts.map +0 -1
- package/lib-esm/src/util/index.d.ts.map +0 -1
- package/lib-esm/tsconfig.tsbuildinfo +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.accessSchemaData = exports.accessData = exports.allow = exports.ResourceOperations = exports.Operations = exports.Strategies = exports.CustomProviders = exports.GroupProviders = exports.OwnerProviders = exports.PrivateProviders = exports.PublicProviders = exports.Providers = void 0;
|
|
4
|
+
exports.accessSchemaData = exports.accessData = exports.allowForCustomOperations = exports.allow = exports.ResourceOperations = exports.Operations = exports.Strategies = exports.CustomProviders = exports.GroupProviders = exports.OwnerProviders = exports.PrivateProviders = exports.PublicProviders = exports.Providers = void 0;
|
|
4
5
|
const __data = Symbol('data');
|
|
5
6
|
/**
|
|
6
7
|
* All possible providers.
|
|
@@ -77,11 +78,6 @@ function to(operations) {
|
|
|
77
78
|
this[__data].operations = operations;
|
|
78
79
|
return omit(this, 'to');
|
|
79
80
|
}
|
|
80
|
-
function inField(field) {
|
|
81
|
-
this[__data].groupOrOwnerField = field;
|
|
82
|
-
const built = omit(this, 'inField');
|
|
83
|
-
return built;
|
|
84
|
-
}
|
|
85
81
|
/**
|
|
86
82
|
* Specifies a property of the identity JWT to use in place of `sub::username`
|
|
87
83
|
* as the value to match against the owner field for authorization.
|
|
@@ -125,27 +121,36 @@ function authData(defaults, builderMethods) {
|
|
|
125
121
|
*/
|
|
126
122
|
exports.allow = {
|
|
127
123
|
/**
|
|
128
|
-
* Authorize unauthenticated users
|
|
129
|
-
* use `.public('iam')` to use IAM based authorization for unauthenticated users.
|
|
130
|
-
* @param provider the authentication provider - supports "apiKey" or "iam" as valid providers
|
|
124
|
+
* Authorize unauthenticated users by using API key based authorization.
|
|
131
125
|
* @returns an authorization rule for unauthenticated users
|
|
132
126
|
*/
|
|
133
|
-
|
|
134
|
-
validateProvider(provider, exports.PublicProviders);
|
|
127
|
+
publicApiKey() {
|
|
135
128
|
return authData({
|
|
136
129
|
strategy: 'public',
|
|
137
|
-
provider,
|
|
130
|
+
provider: 'apiKey',
|
|
131
|
+
}, {
|
|
132
|
+
to,
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Authorize unauthenticated users by using IAM based authorization.
|
|
137
|
+
* @returns an authorization rule for unauthenticated users
|
|
138
|
+
*/
|
|
139
|
+
guest() {
|
|
140
|
+
return authData({
|
|
141
|
+
strategy: 'public',
|
|
142
|
+
provider: 'iam',
|
|
138
143
|
}, {
|
|
139
144
|
to,
|
|
140
145
|
});
|
|
141
146
|
},
|
|
142
147
|
/**
|
|
143
148
|
* Authorize authenticated users. By default, `.private()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
144
|
-
* use `.
|
|
149
|
+
* use `.authenticated("iam")` or `.authenticated("oidc")` to use IAM or OIDC based authorization for authenticated users.
|
|
145
150
|
* @param provider the authentication provider - supports "userPools", "iam", or "oidc"
|
|
146
151
|
* @returns an authorization rule for authenticated users
|
|
147
152
|
*/
|
|
148
|
-
|
|
153
|
+
authenticated(provider) {
|
|
149
154
|
validateProvider(provider, exports.PrivateProviders);
|
|
150
155
|
return authData({
|
|
151
156
|
strategy: 'private',
|
|
@@ -157,8 +162,8 @@ exports.allow = {
|
|
|
157
162
|
/**
|
|
158
163
|
* Authorize access on a per-user (owner) basis. By setting owner-based authorization, a new `owner: a.string()`
|
|
159
164
|
* field will be added to the model to store which user "owns" the item. Upon item creation, the "owner field" is
|
|
160
|
-
* auto-populated with the authenticated user's information.
|
|
161
|
-
*
|
|
165
|
+
* auto-populated with the authenticated user's information. If you want to specify which field should be used as
|
|
166
|
+
* the owner field, you can use the `ownerDefinedIn` builder function instead.
|
|
162
167
|
*
|
|
163
168
|
* By default, `.owner()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
164
169
|
* use `.owner("oidc")` to use OIDC based authentication to designate the owner.
|
|
@@ -177,7 +182,30 @@ exports.allow = {
|
|
|
177
182
|
groupOrOwnerField: 'owner',
|
|
178
183
|
}, {
|
|
179
184
|
to,
|
|
180
|
-
|
|
185
|
+
identityClaim,
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
/**
|
|
189
|
+
* Authorize access on a per-user (owner) basis with specifying which field should be used as the owner field.
|
|
190
|
+
*
|
|
191
|
+
* By default, `.owner()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
192
|
+
* use `.ownerDefinedIn("owner", "oidc")` to use OIDC based authentication to designate the owner.
|
|
193
|
+
*
|
|
194
|
+
* To change the specific claim that should be used as the user identifier within the owner field, chain the
|
|
195
|
+
* `.identityClaim(...)` method.
|
|
196
|
+
*
|
|
197
|
+
* @param ownerField the field that contains the owner information
|
|
198
|
+
* @param provider the authentication provider - supports "userPools", "iam", or "oidc"
|
|
199
|
+
* @returns an authorization rule for authenticated users
|
|
200
|
+
*/
|
|
201
|
+
ownerDefinedIn(ownerField, provider) {
|
|
202
|
+
validateProvider(provider, exports.OwnerProviders);
|
|
203
|
+
return authData({
|
|
204
|
+
strategy: 'owner',
|
|
205
|
+
provider,
|
|
206
|
+
groupOrOwnerField: ownerField,
|
|
207
|
+
}, {
|
|
208
|
+
to,
|
|
181
209
|
identityClaim,
|
|
182
210
|
});
|
|
183
211
|
},
|
|
@@ -185,35 +213,36 @@ exports.allow = {
|
|
|
185
213
|
* Authorize access for multi-user / multi-owner access. By setting multi-owner-based authorization, a new `owners: a.string().array()`
|
|
186
214
|
* field will be added to the model to store which users "own" the item. Upon item creation, the "owners field" is
|
|
187
215
|
* auto-populated with the authenticated user's information. To grant other users access to the item, append their user identifier into the `owners` array.
|
|
188
|
-
* You can which field should be used as the owners field by chaining the * `.inField(...)` method.
|
|
189
216
|
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
217
|
+
* You can specify which field should be used as the owners field by passing the `ownersField` parameter.
|
|
218
|
+
*
|
|
219
|
+
* By default, `.ownersDefinedIn()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
220
|
+
* use `.ownersDefinedIn("owners", "oidc")` to use OIDC based authentication to designate the owner.
|
|
192
221
|
*
|
|
193
222
|
* To change the specific claim that should be used as the user identifier within the owners field, chain the
|
|
194
223
|
* `.identityClaim(...)` method.
|
|
195
224
|
*
|
|
225
|
+
* @param ownersField the field that contains the owners information
|
|
196
226
|
* @param provider the authentication provider - supports "userPools", "iam", or "oidc"
|
|
197
227
|
* @returns an authorization rule for authenticated users
|
|
198
228
|
*/
|
|
199
|
-
|
|
229
|
+
ownersDefinedIn(ownersField, provider) {
|
|
200
230
|
validateProvider(provider, exports.OwnerProviders);
|
|
201
231
|
return authData({
|
|
202
232
|
strategy: 'owner',
|
|
203
|
-
multiOwner: true,
|
|
204
233
|
provider,
|
|
205
|
-
groupOrOwnerField:
|
|
234
|
+
groupOrOwnerField: ownersField,
|
|
235
|
+
multiOwner: true,
|
|
206
236
|
}, {
|
|
207
237
|
to,
|
|
208
|
-
inField,
|
|
209
238
|
identityClaim,
|
|
210
239
|
});
|
|
211
240
|
},
|
|
212
241
|
/**
|
|
213
242
|
* Authorize a specific user group. Provide the name of the specific user group to have access.
|
|
214
243
|
*
|
|
215
|
-
* By default, `.
|
|
216
|
-
* use `.
|
|
244
|
+
* By default, `.group()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
245
|
+
* use `.group("group-name", "oidc")` to use OIDC based authentication to designate the user group.
|
|
217
246
|
*
|
|
218
247
|
* To change the specific claim that should be used as the user group identifier, chain the
|
|
219
248
|
* `.withClaimIn(...)` method.
|
|
@@ -221,7 +250,7 @@ exports.allow = {
|
|
|
221
250
|
* @param provider the authentication provider - supports "userPools" or "oidc"
|
|
222
251
|
* @returns an authorization rule to grant access by a specific group
|
|
223
252
|
*/
|
|
224
|
-
|
|
253
|
+
group(group, provider) {
|
|
225
254
|
return authData({
|
|
226
255
|
strategy: 'groups',
|
|
227
256
|
provider,
|
|
@@ -234,8 +263,8 @@ exports.allow = {
|
|
|
234
263
|
/**
|
|
235
264
|
* Authorize multiple specific user groups. Provide the names of the specific user groups to have access.
|
|
236
265
|
*
|
|
237
|
-
* By default, `.
|
|
238
|
-
* use `.
|
|
266
|
+
* By default, `.groups()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
267
|
+
* use `.groups(["group-a", "group-b"], "oidc")` to use OIDC based authentication to designate the user group.
|
|
239
268
|
*
|
|
240
269
|
* To change the specific claim that should be used as the user group identifier, chain the
|
|
241
270
|
* `.withClaimIn(...)` method.
|
|
@@ -243,7 +272,7 @@ exports.allow = {
|
|
|
243
272
|
* @param provider the authentication provider - supports "userPools" or "oidc"
|
|
244
273
|
* @returns an authorization rule to grant access by a specific group
|
|
245
274
|
*/
|
|
246
|
-
|
|
275
|
+
groups(groups, provider) {
|
|
247
276
|
return authData({
|
|
248
277
|
strategy: 'groups',
|
|
249
278
|
provider,
|
|
@@ -312,6 +341,94 @@ exports.allow = {
|
|
|
312
341
|
});
|
|
313
342
|
},
|
|
314
343
|
};
|
|
344
|
+
/**
|
|
345
|
+
* This is a copy of the {@link allow} defined above, with modifications for custom operations.
|
|
346
|
+
*
|
|
347
|
+
* Removed builder methods:
|
|
348
|
+
*
|
|
349
|
+
* * `owner`
|
|
350
|
+
* * `ownerDefinedIn`
|
|
351
|
+
* * `ownersDefinedIn`
|
|
352
|
+
* * `groupDefinedIn`
|
|
353
|
+
* * `groupsDefinedIn`
|
|
354
|
+
* * `resource`
|
|
355
|
+
* * `.to()` builder method from each available rule builder
|
|
356
|
+
*/
|
|
357
|
+
exports.allowForCustomOperations = {
|
|
358
|
+
/**
|
|
359
|
+
* Authorize unauthenticated users by using API key based authorization.
|
|
360
|
+
* @returns an authorization rule for unauthenticated users
|
|
361
|
+
*/
|
|
362
|
+
publicApiKey() {
|
|
363
|
+
return authData({
|
|
364
|
+
strategy: 'public',
|
|
365
|
+
provider: 'apiKey',
|
|
366
|
+
}, {});
|
|
367
|
+
},
|
|
368
|
+
/**
|
|
369
|
+
* Authorize unauthenticated users by using IAM based authorization.
|
|
370
|
+
* @returns an authorization rule for unauthenticated users
|
|
371
|
+
*/
|
|
372
|
+
guest() {
|
|
373
|
+
return authData({
|
|
374
|
+
strategy: 'public',
|
|
375
|
+
provider: 'iam',
|
|
376
|
+
}, {});
|
|
377
|
+
},
|
|
378
|
+
/**
|
|
379
|
+
* Authorize authenticated users. By default, `.private()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
380
|
+
* use `.authenticated("iam")` or `.authenticated("oidc")` to use IAM or OIDC based authorization for authenticated users.
|
|
381
|
+
* @param provider the authentication provider - supports "userPools", "iam", or "oidc"
|
|
382
|
+
* @returns an authorization rule for authenticated users
|
|
383
|
+
*/
|
|
384
|
+
authenticated(provider) {
|
|
385
|
+
validateProvider(provider, exports.PrivateProviders);
|
|
386
|
+
return authData({
|
|
387
|
+
strategy: 'private',
|
|
388
|
+
provider,
|
|
389
|
+
}, {});
|
|
390
|
+
},
|
|
391
|
+
/**
|
|
392
|
+
* Authorize a specific user group. Provide the name of the specific user group to have access.
|
|
393
|
+
*
|
|
394
|
+
* By default, `.group()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
395
|
+
* use `.group("group-name", "oidc")` to use OIDC based authentication to designate the user group.
|
|
396
|
+
*
|
|
397
|
+
* @param group the name of the group to authorize
|
|
398
|
+
* @param provider the authentication provider - supports "userPools" or "oidc"
|
|
399
|
+
* @returns an authorization rule to grant access by a specific group
|
|
400
|
+
*/
|
|
401
|
+
group(group, provider) {
|
|
402
|
+
return authData({
|
|
403
|
+
strategy: 'groups',
|
|
404
|
+
provider,
|
|
405
|
+
groups: [group],
|
|
406
|
+
}, {});
|
|
407
|
+
},
|
|
408
|
+
/**
|
|
409
|
+
* Authorize multiple specific user groups. Provide the names of the specific user groups to have access.
|
|
410
|
+
*
|
|
411
|
+
* By default, `.groups()` uses an Amazon Cognito user pool based authorization. You can additionally
|
|
412
|
+
* use `.groups(["group-a", "group-b"], "oidc")` to use OIDC based authentication to designate the user group.
|
|
413
|
+
*
|
|
414
|
+
* @param groups the names of the group to authorize defined as an array
|
|
415
|
+
* @param provider the authentication provider - supports "userPools" or "oidc"
|
|
416
|
+
* @returns an authorization rule to grant access by a specific group
|
|
417
|
+
*/
|
|
418
|
+
groups(groups, provider) {
|
|
419
|
+
return authData({
|
|
420
|
+
strategy: 'groups',
|
|
421
|
+
provider,
|
|
422
|
+
groups,
|
|
423
|
+
}, {});
|
|
424
|
+
},
|
|
425
|
+
custom(provider) {
|
|
426
|
+
return authData({
|
|
427
|
+
strategy: 'custom',
|
|
428
|
+
provider,
|
|
429
|
+
}, {});
|
|
430
|
+
},
|
|
431
|
+
};
|
|
315
432
|
function resourceTo(operations) {
|
|
316
433
|
this[__data].operations = operations;
|
|
317
434
|
return omit(this, 'to');
|
|
@@ -330,3 +447,4 @@ exports.accessData = accessData;
|
|
|
330
447
|
// TODO: delete when we make resource auth available at each level in the schema (model, field)
|
|
331
448
|
const accessSchemaData = (authorization) => authorization[__data];
|
|
332
449
|
exports.accessSchemaData = accessSchemaData;
|
|
450
|
+
//# sourceMappingURL=Authorization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Authorization.js","sources":["../../src/Authorization.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.accessSchemaData = exports.accessData = exports.allowForCustomOperations = exports.allow = exports.ResourceOperations = exports.Operations = exports.Strategies = exports.CustomProviders = exports.GroupProviders = exports.OwnerProviders = exports.PrivateProviders = exports.PublicProviders = exports.Providers = void 0;\nconst __data = Symbol('data');\n/**\n * All possible providers.\n *\n * This list should not be used if you need to restrict available providers\n * according to an auth strategcy. E.g., `public` auth can only be facilitated\n * by `apiKey` and `iam` providers.\n */\nexports.Providers = [\n 'apiKey',\n 'iam',\n 'userPools',\n 'oidc',\n 'function',\n];\n/**\n * The subset of auth providers that can facilitate `public` auth.\n */\nexports.PublicProviders = ['apiKey', 'iam'];\n/**\n * The subset of auth providers that can facilitate `private` auth.\n */\nexports.PrivateProviders = ['userPools', 'oidc', 'iam'];\n/**\n * The subset of auth providers that can facilitate `owner` auth.\n */\nexports.OwnerProviders = ['userPools', 'oidc'];\n/**\n * The subset of auth providers that can facilitate `group` auth.\n */\nexports.GroupProviders = ['userPools', 'oidc'];\n/**\n * The subset of auth providers that can facilitate `custom` auth.\n */\nexports.CustomProviders = ['function'];\nexports.Strategies = [\n 'public',\n 'private',\n 'owner',\n 'groups',\n 'custom',\n];\n/**\n * The operations that can be performed against an API.\n */\nexports.Operations = [\n 'create',\n 'update',\n 'delete',\n 'read',\n 'get',\n 'list',\n 'sync',\n 'listen',\n 'search',\n];\n/**\n * The operations that can be performed against an API by a Lambda function.\n */\nexports.ResourceOperations = ['query', 'mutate', 'listen'];\n/**\n * Creates a shallow copy of an object with an individual field pruned away.\n *\n * @param original The original object to prune.\n * @param without The field to prune.\n * @returns The pruned object.\n */\nfunction omit(original, without) {\n const pruned = { ...original };\n delete pruned[without];\n return pruned;\n}\nfunction to(operations) {\n this[__data].operations = operations;\n return omit(this, 'to');\n}\n/**\n * Specifies a property of the identity JWT to use in place of `sub::username`\n * as the value to match against the owner field for authorization.\n *\n * @param this Authorization object to operate against.\n * @param property A property of identity JWT.\n * @returns A copy of the Authorization object with the claim attached.\n */\nfunction identityClaim(property) {\n this[__data].identityClaim = property;\n return omit(this, 'identityClaim');\n}\nfunction withClaimIn(property) {\n this[__data].groupClaim = property;\n return omit(this, 'withClaimIn');\n}\nfunction validateProvider(needle, haystack) {\n if (needle && !haystack.includes(needle)) {\n throw new Error(`Invalid provider (${needle}) given!`);\n }\n}\nfunction authData(defaults, builderMethods) {\n return {\n [__data]: {\n strategy: 'public',\n provider: undefined,\n operations: undefined,\n groupOrOwnerField: undefined,\n multiOwner: false,\n identityClaim: undefined,\n groups: undefined,\n ...defaults,\n },\n ...builderMethods,\n };\n}\n/**\n * Defines an authorization rule for your data models and fields. First choose an authorization strategy (`public`,\n * `private`, `owner`, `group`, or `custom`), then choose an auth provider (`apiKey`, `iam`, `userPools`, `oidc`, or `function`)\n * and optionally use `.to(...)` to specify the operations that can be performed against your data models and fields.\n */\nexports.allow = {\n /**\n * Authorize unauthenticated users by using API key based authorization.\n * @returns an authorization rule for unauthenticated users\n */\n publicApiKey() {\n return authData({\n strategy: 'public',\n provider: 'apiKey',\n }, {\n to,\n });\n },\n /**\n * Authorize unauthenticated users by using IAM based authorization.\n * @returns an authorization rule for unauthenticated users\n */\n guest() {\n return authData({\n strategy: 'public',\n provider: 'iam',\n }, {\n to,\n });\n },\n /**\n * Authorize authenticated users. By default, `.private()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.authenticated(\"iam\")` or `.authenticated(\"oidc\")` to use IAM or OIDC based authorization for authenticated users.\n * @param provider the authentication provider - supports \"userPools\", \"iam\", or \"oidc\"\n * @returns an authorization rule for authenticated users\n */\n authenticated(provider) {\n validateProvider(provider, exports.PrivateProviders);\n return authData({\n strategy: 'private',\n provider,\n }, {\n to,\n });\n },\n /**\n * Authorize access on a per-user (owner) basis. By setting owner-based authorization, a new `owner: a.string()`\n * field will be added to the model to store which user \"owns\" the item. Upon item creation, the \"owner field\" is\n * auto-populated with the authenticated user's information. If you want to specify which field should be used as\n * the owner field, you can use the `ownerDefinedIn` builder function instead.\n *\n * By default, `.owner()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.owner(\"oidc\")` to use OIDC based authentication to designate the owner.\n *\n * To change the specific claim that should be used as the user identifier within the owner field, chain the\n * `.identityClaim(...)` method.\n *\n * @param provider the authentication provider - supports \"userPools\", \"iam\", or \"oidc\"\n * @returns an authorization rule for authenticated users\n */\n owner(provider) {\n validateProvider(provider, exports.OwnerProviders);\n return authData({\n strategy: 'owner',\n provider,\n groupOrOwnerField: 'owner',\n }, {\n to,\n identityClaim,\n });\n },\n /**\n * Authorize access on a per-user (owner) basis with specifying which field should be used as the owner field.\n *\n * By default, `.owner()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.ownerDefinedIn(\"owner\", \"oidc\")` to use OIDC based authentication to designate the owner.\n *\n * To change the specific claim that should be used as the user identifier within the owner field, chain the\n * `.identityClaim(...)` method.\n *\n * @param ownerField the field that contains the owner information\n * @param provider the authentication provider - supports \"userPools\", \"iam\", or \"oidc\"\n * @returns an authorization rule for authenticated users\n */\n ownerDefinedIn(ownerField, provider) {\n validateProvider(provider, exports.OwnerProviders);\n return authData({\n strategy: 'owner',\n provider,\n groupOrOwnerField: ownerField,\n }, {\n to,\n identityClaim,\n });\n },\n /**\n * Authorize access for multi-user / multi-owner access. By setting multi-owner-based authorization, a new `owners: a.string().array()`\n * field will be added to the model to store which users \"own\" the item. Upon item creation, the \"owners field\" is\n * auto-populated with the authenticated user's information. To grant other users access to the item, append their user identifier into the `owners` array.\n *\n * You can specify which field should be used as the owners field by passing the `ownersField` parameter.\n *\n * By default, `.ownersDefinedIn()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.ownersDefinedIn(\"owners\", \"oidc\")` to use OIDC based authentication to designate the owner.\n *\n * To change the specific claim that should be used as the user identifier within the owners field, chain the\n * `.identityClaim(...)` method.\n *\n * @param ownersField the field that contains the owners information\n * @param provider the authentication provider - supports \"userPools\", \"iam\", or \"oidc\"\n * @returns an authorization rule for authenticated users\n */\n ownersDefinedIn(ownersField, provider) {\n validateProvider(provider, exports.OwnerProviders);\n return authData({\n strategy: 'owner',\n provider,\n groupOrOwnerField: ownersField,\n multiOwner: true,\n }, {\n to,\n identityClaim,\n });\n },\n /**\n * Authorize a specific user group. Provide the name of the specific user group to have access.\n *\n * By default, `.group()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.group(\"group-name\", \"oidc\")` to use OIDC based authentication to designate the user group.\n *\n * To change the specific claim that should be used as the user group identifier, chain the\n * `.withClaimIn(...)` method.\n * @param group the name of the group to authorize\n * @param provider the authentication provider - supports \"userPools\" or \"oidc\"\n * @returns an authorization rule to grant access by a specific group\n */\n group(group, provider) {\n return authData({\n strategy: 'groups',\n provider,\n groups: [group],\n }, {\n to,\n withClaimIn,\n });\n },\n /**\n * Authorize multiple specific user groups. Provide the names of the specific user groups to have access.\n *\n * By default, `.groups()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.groups([\"group-a\", \"group-b\"], \"oidc\")` to use OIDC based authentication to designate the user group.\n *\n * To change the specific claim that should be used as the user group identifier, chain the\n * `.withClaimIn(...)` method.\n * @param groups the names of the group to authorize defined as an array\n * @param provider the authentication provider - supports \"userPools\" or \"oidc\"\n * @returns an authorization rule to grant access by a specific group\n */\n groups(groups, provider) {\n return authData({\n strategy: 'groups',\n provider,\n groups,\n }, {\n to,\n withClaimIn,\n });\n },\n /**\n * Authorize if a user is part of a group defined in a data model field.\n *\n * By default, `.groupDefinedIn()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.groupDefinedIn(\"field-name\", \"oidc\")` to use OIDC based authentication to designate the user group.\n *\n * To change the specific claim that should be used as the user group identifier within the groups field, chain the\n * `.withClaimIn(...)` method.\n * @param groupsField the field that should store the authorized user group information\n * @param provider the authentication provider - supports \"userPools\" or \"oidc\"\n * @returns an authorization rule to grant access by a specific group\n */\n groupDefinedIn(groupsField, provider) {\n return authData({\n strategy: 'groups',\n provider,\n groupOrOwnerField: groupsField,\n }, {\n to,\n withClaimIn,\n });\n },\n /**\n * Authorize if a user is part of a one of the groups defined in a data model field.\n *\n * By default, `.groupsDefinedIn()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.groupsDefinedIn(\"field-name\", \"oidc\")` to use OIDC based authentication to designate the user group.\n *\n * To change the specific claim that should be used as the user group identifier within the groups field, chain the\n * `.withClaimIn(...)` method.\n * @param groupsField the field that should store the list of authorized user groups\n * @param provider the authentication provider - supports \"userPools\" or \"oidc\"\n * @returns an authorization rule to grant access by a specific group\n */\n groupsDefinedIn(groupsField, provider) {\n return authData({\n strategy: 'groups',\n provider,\n groupOrOwnerField: groupsField,\n multiOwner: true,\n }, {\n to,\n withClaimIn,\n });\n },\n custom(provider) {\n return authData({\n strategy: 'custom',\n provider,\n }, {\n to,\n });\n },\n resource(fn) {\n return resourceAuthData(fn, {\n to: resourceTo,\n });\n },\n};\n/**\n * This is a copy of the {@link allow} defined above, with modifications for custom operations.\n *\n * Removed builder methods:\n *\n * * `owner`\n * * `ownerDefinedIn`\n * * `ownersDefinedIn`\n * * `groupDefinedIn`\n * * `groupsDefinedIn`\n * * `resource`\n * * `.to()` builder method from each available rule builder\n */\nexports.allowForCustomOperations = {\n /**\n * Authorize unauthenticated users by using API key based authorization.\n * @returns an authorization rule for unauthenticated users\n */\n publicApiKey() {\n return authData({\n strategy: 'public',\n provider: 'apiKey',\n }, {});\n },\n /**\n * Authorize unauthenticated users by using IAM based authorization.\n * @returns an authorization rule for unauthenticated users\n */\n guest() {\n return authData({\n strategy: 'public',\n provider: 'iam',\n }, {});\n },\n /**\n * Authorize authenticated users. By default, `.private()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.authenticated(\"iam\")` or `.authenticated(\"oidc\")` to use IAM or OIDC based authorization for authenticated users.\n * @param provider the authentication provider - supports \"userPools\", \"iam\", or \"oidc\"\n * @returns an authorization rule for authenticated users\n */\n authenticated(provider) {\n validateProvider(provider, exports.PrivateProviders);\n return authData({\n strategy: 'private',\n provider,\n }, {});\n },\n /**\n * Authorize a specific user group. Provide the name of the specific user group to have access.\n *\n * By default, `.group()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.group(\"group-name\", \"oidc\")` to use OIDC based authentication to designate the user group.\n *\n * @param group the name of the group to authorize\n * @param provider the authentication provider - supports \"userPools\" or \"oidc\"\n * @returns an authorization rule to grant access by a specific group\n */\n group(group, provider) {\n return authData({\n strategy: 'groups',\n provider,\n groups: [group],\n }, {});\n },\n /**\n * Authorize multiple specific user groups. Provide the names of the specific user groups to have access.\n *\n * By default, `.groups()` uses an Amazon Cognito user pool based authorization. You can additionally\n * use `.groups([\"group-a\", \"group-b\"], \"oidc\")` to use OIDC based authentication to designate the user group.\n *\n * @param groups the names of the group to authorize defined as an array\n * @param provider the authentication provider - supports \"userPools\" or \"oidc\"\n * @returns an authorization rule to grant access by a specific group\n */\n groups(groups, provider) {\n return authData({\n strategy: 'groups',\n provider,\n groups,\n }, {});\n },\n custom(provider) {\n return authData({\n strategy: 'custom',\n provider,\n }, {});\n },\n};\nfunction resourceTo(operations) {\n this[__data].operations = operations;\n return omit(this, 'to');\n}\nfunction resourceAuthData(resource, builderMethods) {\n return {\n [__data]: {\n strategy: 'resource',\n resource,\n },\n ...builderMethods,\n };\n}\nconst accessData = (authorization) => authorization[__data];\nexports.accessData = accessData;\n// TODO: delete when we make resource auth available at each level in the schema (model, field)\nconst accessSchemaData = (authorization) => authorization[__data];\nexports.accessSchemaData = accessSchemaData;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAA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,GAAG,gBAAgB;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientSchema.js","sources":["../../src/ClientSchema.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.combine = exports.combinedSchemaBrand = void 0;
|
|
4
5
|
const util_1 = require("./util");
|
|
5
|
-
const COMBINED_SCHEMA_LIMIT = 50;
|
|
6
6
|
const CombinedSchemaBrandName = 'CombinedSchema';
|
|
7
7
|
exports.combinedSchemaBrand = (0, util_1.brand)(CombinedSchemaBrandName);
|
|
8
8
|
/**
|
|
@@ -38,3 +38,4 @@ function validateDuplicateTypeNames(schemas) {
|
|
|
38
38
|
throw new Error(`The schemas you are attempting to combine have a name collision. Please remove or rename ${Array.from(duplicateKeySet).join(', ')}.`);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
//# sourceMappingURL=CombineSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CombineSchema.js","sources":["../../src/CombineSchema.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.combine = exports.combinedSchemaBrand = void 0;\nconst util_1 = require(\"./util\");\nconst COMBINED_SCHEMA_LIMIT = 50;\nconst CombinedSchemaBrandName = 'CombinedSchema';\nexports.combinedSchemaBrand = (0, util_1.brand)(CombinedSchemaBrandName);\n/**\n * The interface for merging up to 50 schemas into a single API.\n * @param schemas The schemas to combine into a single API\n * @returns An API and data model definition to be deployed with Amplify (Gen 2) experience (`processSchema(...)`)\n * or with the Amplify Data CDK construct (`@aws-amplify/data-construct`)\n */\nfunction combine(schemas) {\n return internalCombine(schemas);\n}\nexports.combine = combine;\nfunction internalCombine(schemas) {\n validateDuplicateTypeNames(schemas);\n return {\n ...exports.combinedSchemaBrand,\n schemas: schemas,\n };\n}\nfunction validateDuplicateTypeNames(schemas) {\n const allSchemaKeys = schemas.flatMap((s) => Object.keys(s.data.types));\n const keySet = new Set();\n const duplicateKeySet = new Set();\n allSchemaKeys.forEach((key) => {\n if (keySet.has(key)) {\n duplicateKeySet.add(key);\n }\n else {\n keySet.add(key);\n }\n });\n if (duplicateKeySet.size > 0) {\n throw new Error(`The schemas you are attempting to combine have a name collision. Please remove or rename ${Array.from(duplicateKeySet).join(', ')}.`);\n }\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,mBAAmB,GAAG,KAAK,CAAC,CAAC;AACvD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AACjD,OAAO,CAAC,mBAAmB,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,uBAAuB,CAAC,CAAC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO,CAAC,OAAO,EAAE;AAC1B,IAAI,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,SAAS,eAAe,CAAC,OAAO,EAAE;AAClC,IAAI,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACxC,IAAI,OAAO;AACX,QAAQ,GAAG,OAAO,CAAC,mBAAmB;AACtC,QAAQ,OAAO,EAAE,OAAO;AACxB,KAAK,CAAC;AACN,CAAC;AACD,SAAS,0BAA0B,CAAC,OAAO,EAAE;AAC7C,IAAI,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5E,IAAI,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;AAC7B,IAAI,MAAM,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;AACtC,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AACnC,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AAC7B,YAAY,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACrC,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,EAAE;AAClC,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,yFAAyF,EAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/J,KAAK;AACL;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.subscription = exports.mutation = exports.query = exports.CustomOperationNames = void 0;
|
|
4
5
|
const util_1 = require("./util");
|
|
6
|
+
const Authorization_1 = require("./Authorization");
|
|
5
7
|
const queryBrand = 'queryCustomOperation';
|
|
6
8
|
const mutationBrand = 'mutationCustomOperation';
|
|
7
9
|
const subscriptionBrand = 'subscriptionCustomOperation';
|
|
@@ -36,8 +38,9 @@ function _custom(typeName, brand) {
|
|
|
36
38
|
data.functionRef = functionRefOrName;
|
|
37
39
|
return this;
|
|
38
40
|
},
|
|
39
|
-
authorization(
|
|
40
|
-
|
|
41
|
+
authorization(callback) {
|
|
42
|
+
const rules = callback(Authorization_1.allowForCustomOperations);
|
|
43
|
+
data.authorization = Array.isArray(rules) ? rules : [rules];
|
|
41
44
|
return this;
|
|
42
45
|
},
|
|
43
46
|
handler(handlers) {
|
|
@@ -65,3 +68,4 @@ function subscription() {
|
|
|
65
68
|
return _custom('Subscription', subscriptionBrand);
|
|
66
69
|
}
|
|
67
70
|
exports.subscription = subscription;
|
|
71
|
+
//# sourceMappingURL=CustomOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomOperation.js","sources":["../../src/CustomOperation.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.subscription = exports.mutation = exports.query = exports.CustomOperationNames = void 0;\nconst util_1 = require(\"./util\");\nconst Authorization_1 = require(\"./Authorization\");\nconst queryBrand = 'queryCustomOperation';\nconst mutationBrand = 'mutationCustomOperation';\nconst subscriptionBrand = 'subscriptionCustomOperation';\nexports.CustomOperationNames = [\n 'Query',\n 'Mutation',\n 'Subscription',\n];\nfunction brandedBuilder(builder, brandValue) {\n return { ...builder, ...(0, util_1.brand)(brandValue) };\n}\nfunction _custom(typeName, brand) {\n const data = {\n arguments: {},\n returnType: null,\n functionRef: null,\n authorization: [],\n typeName: typeName,\n handlers: null,\n subscriptionSource: [],\n };\n const builder = brandedBuilder({\n arguments(args) {\n data.arguments = args;\n return this;\n },\n returns(returnType) {\n data.returnType = returnType;\n return this;\n },\n function(functionRefOrName) {\n data.functionRef = functionRefOrName;\n return this;\n },\n authorization(callback) {\n const rules = callback(Authorization_1.allowForCustomOperations);\n data.authorization = Array.isArray(rules) ? rules : [rules];\n return this;\n },\n handler(handlers) {\n data.handlers = Array.isArray(handlers)\n ? handlers\n : [handlers];\n return this;\n },\n for(source) {\n data.subscriptionSource = Array.isArray(source) ? source : [source];\n return this;\n },\n }, brand);\n return { ...builder, data };\n}\nfunction query() {\n return _custom('Query', queryBrand);\n}\nexports.query = query;\nfunction mutation() {\n return _custom('Mutation', mutationBrand);\n}\nexports.mutation = mutation;\nfunction subscription() {\n return _custom('Subscription', subscriptionBrand);\n}\nexports.subscription = subscription;\n"],"names":[],"mappings":";;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,KAAK,GAAG,OAAO,CAAC,oBAAoB,GAAG,KAAK,CAAC,CAAC;AAChG,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACnD,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,iBAAiB,GAAG,6BAA6B,CAAC;AACxD,OAAO,CAAC,oBAAoB,GAAG;AAC/B,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,CAAC,CAAC;AACF,SAAS,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;AAC7C,IAAI,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC;AAC5D,CAAC;AACD,SAAS,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE;AAClC,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,SAAS,EAAE,EAAE;AACrB,QAAQ,UAAU,EAAE,IAAI;AACxB,QAAQ,WAAW,EAAE,IAAI;AACzB,QAAQ,aAAa,EAAE,EAAE;AACzB,QAAQ,QAAQ,EAAE,QAAQ;AAC1B,QAAQ,QAAQ,EAAE,IAAI;AACtB,QAAQ,kBAAkB,EAAE,EAAE;AAC9B,KAAK,CAAC;AACN,IAAI,MAAM,OAAO,GAAG,cAAc,CAAC;AACnC,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AAE,UAAU,CAAC,CAAC;AACxC,CAAC;AACD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB,SAAS,QAAQ,GAAG;AACpB,IAAI,OAAO,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAC9C,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC5B,SAAS,YAAY,GAAG;AACxB,IAAI,OAAO,OAAO,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AACtD,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.customType = void 0;
|
|
4
5
|
function _customType(fields) {
|
|
@@ -12,3 +13,4 @@ function customType(fields) {
|
|
|
12
13
|
return _customType(fields);
|
|
13
14
|
}
|
|
14
15
|
exports.customType = customType;
|
|
16
|
+
//# sourceMappingURL=CustomType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomType.js","sources":["../../src/CustomType.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.customType = void 0;\nfunction _customType(fields) {\n const data = {\n fields,\n type: 'customType',\n };\n return { data };\n}\nfunction customType(fields) {\n return _customType(fields);\n}\nexports.customType = customType;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AAC5B,SAAS,WAAW,CAAC,MAAM,EAAE;AAC7B,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,MAAM;AACd,QAAQ,IAAI,EAAE,YAAY;AAC1B,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;AACpB,CAAC;AACD,SAAS,UAAU,CAAC,MAAM,EAAE;AAC5B,IAAI,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AACD,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.enumType = void 0;
|
|
4
5
|
function _enum(values) {
|
|
@@ -15,3 +16,4 @@ function enumType(values) {
|
|
|
15
16
|
return _enum(values);
|
|
16
17
|
}
|
|
17
18
|
exports.enumType = enumType;
|
|
19
|
+
//# sourceMappingURL=EnumType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnumType.js","sources":["../../src/EnumType.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enumType = void 0;\nfunction _enum(values) {\n const data = {\n type: 'enum',\n values,\n };\n return data;\n}\n/**\n * this type param pattern allows us to infer literal type values from the array without using the `as const` suffix\n */\nfunction enumType(values) {\n return _enum(values);\n}\nexports.enumType = enumType;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;AAC1B,SAAS,KAAK,CAAC,MAAM,EAAE;AACvB,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,IAAI,EAAE,MAAM;AACpB,QAAQ,MAAM;AACd,KAAK,CAAC;AACN,IAAI,OAAO,IAAI,CAAC;AAChB,CAAC;AACD;AACA;AACA;AACA,SAAS,QAAQ,CAAC,MAAM,EAAE;AAC1B,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC;AACD,OAAO,CAAC,QAAQ,GAAG,QAAQ;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.handler = exports.getHandlerData = void 0;
|
|
4
5
|
const util_1 = require("./util");
|
|
@@ -46,3 +47,4 @@ exports.handler = {
|
|
|
46
47
|
custom,
|
|
47
48
|
function: fcn,
|
|
48
49
|
};
|
|
50
|
+
//# sourceMappingURL=Handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Handler.js","sources":["../../src/Handler.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handler = exports.getHandlerData = void 0;\nconst util_1 = require(\"./util\");\nconst dataSymbol = Symbol('Data');\nfunction buildHandler(brandName) {\n return (0, util_1.brand)(brandName);\n}\nfunction getHandlerData(handler) {\n return handler[dataSymbol];\n}\nexports.getHandlerData = getHandlerData;\n//#region handler.inlineSql\nconst inlineSqlBrand = 'inlineSql';\nfunction inlineSql(sql) {\n return { [dataSymbol]: sql, ...buildHandler(inlineSqlBrand) };\n}\n//#endregion\n//#region handler.sqlReference\nconst sqlReferenceBrand = 'sqlReference';\nfunction sqlReference(sqlFilePath) {\n // used to determine caller directory in order to resolve relative path downstream\n const stack = new Error().stack;\n return {\n [dataSymbol]: { stack, entry: sqlFilePath },\n ...buildHandler(sqlReferenceBrand),\n };\n}\nconst customHandlerBrand = 'customHandler';\nfunction custom(customHandler) {\n // used to determine caller directory in order to resolve relative path downstream\n const stack = new Error().stack;\n return {\n [dataSymbol]: { ...customHandler, stack },\n ...buildHandler(customHandlerBrand),\n };\n}\nconst functionHandlerBrand = 'functionHandler';\nfunction fcn(fn) {\n return { [dataSymbol]: fn, ...buildHandler(functionHandlerBrand) };\n}\n//#endregion\nexports.handler = {\n inlineSql,\n sqlReference,\n custom,\n function: fcn,\n};\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAA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;AACjD,QAAQ,GAAG,YAAY,CAAC,kBAAkB,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAC/C,SAAS,GAAG,CAAC,EAAE,EAAE;AACjB,IAAI,OAAO,EAAE,CAAC,UAAU,GAAG,EAAE,EAAE,GAAG,YAAY,CAAC,oBAAoB,CAAC,EAAE,CAAC;AACvE,CAAC;AACD;AACA,OAAO,CAAC,OAAO,GAAG;AAClB,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,IAAI,QAAQ,EAAE,GAAG;AACjB,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomOperations.js","sources":["../../../src/MappedTypes/CustomOperations.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtractNonModelTypes.js","sources":["../../../src/MappedTypes/ExtractNonModelTypes.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImplicitFieldInjector.js","sources":["../../../src/MappedTypes/ImplicitFieldInjector.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapSecondaryIndexes.js","sources":["../../../src/MappedTypes/MapSecondaryIndexes.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelMetadata.js","sources":["../../../src/MappedTypes/ModelMetadata.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolveFieldProperties.js","sources":["../../../src/MappedTypes/ResolveFieldProperties.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolveSchema.js","sources":["../../../src/MappedTypes/ResolveSchema.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
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.ModelFieldDataType = exports.ModelFieldType = exports.__auth = void 0;
|
|
4
5
|
const util_1 = require("./util");
|
|
6
|
+
const Authorization_1 = require("./Authorization");
|
|
5
7
|
/**
|
|
6
8
|
* Used to "attach" auth types to ModelField without exposing them on the builder.
|
|
7
9
|
*/
|
|
@@ -77,8 +79,10 @@ function _field(fieldType) {
|
|
|
77
79
|
_meta.lastInvokedMethod = 'default';
|
|
78
80
|
return this;
|
|
79
81
|
},
|
|
80
|
-
authorization(
|
|
81
|
-
|
|
82
|
+
authorization(callback) {
|
|
83
|
+
const { resource: _, ...rest } = Authorization_1.allow;
|
|
84
|
+
const rules = callback(rest);
|
|
85
|
+
data.authorization = Array.isArray(rules) ? rules : [rules];
|
|
82
86
|
_meta.lastInvokedMethod = 'authorization';
|
|
83
87
|
return this;
|
|
84
88
|
},
|
|
@@ -207,3 +211,4 @@ function ipAddress() {
|
|
|
207
211
|
return _field(ModelFieldType.IPAddress);
|
|
208
212
|
}
|
|
209
213
|
exports.ipAddress = ipAddress;
|
|
214
|
+
//# sourceMappingURL=ModelField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelField.js","sources":["../../src/ModelField.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.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.ModelFieldDataType = exports.ModelFieldType = exports.__auth = void 0;\nconst util_1 = require(\"./util\");\nconst Authorization_1 = require(\"./Authorization\");\n/**\n * Used to \"attach\" auth types to ModelField without exposing them on the builder.\n */\nexports.__auth = Symbol('__auth');\nconst brandName = 'modelField';\nvar ModelFieldType;\n(function (ModelFieldType) {\n ModelFieldType[\"Id\"] = \"ID\";\n ModelFieldType[\"String\"] = \"String\";\n ModelFieldType[\"Integer\"] = \"Int\";\n ModelFieldType[\"Float\"] = \"Float\";\n ModelFieldType[\"Boolean\"] = \"Boolean\";\n ModelFieldType[\"Date\"] = \"AWSDate\";\n ModelFieldType[\"Time\"] = \"AWSTime\";\n ModelFieldType[\"DateTime\"] = \"AWSDateTime\";\n ModelFieldType[\"Timestamp\"] = \"AWSTimestamp\";\n ModelFieldType[\"Email\"] = \"AWSEmail\";\n ModelFieldType[\"JSON\"] = \"AWSJSON\";\n ModelFieldType[\"Phone\"] = \"AWSPhone\";\n ModelFieldType[\"Url\"] = \"AWSURL\";\n ModelFieldType[\"IPAddress\"] = \"AWSIPAddress\";\n})(ModelFieldType || (exports.ModelFieldType = ModelFieldType = {}));\nvar ModelFieldDataType;\n(function (ModelFieldDataType) {\n ModelFieldDataType[\"String\"] = \"string\";\n ModelFieldDataType[\"Number\"] = \"number\";\n ModelFieldDataType[\"Boolean\"] = \"boolean\";\n ModelFieldDataType[\"Date\"] = \"Date\";\n ModelFieldDataType[\"JSON\"] = \"any\";\n})(ModelFieldDataType || (exports.ModelFieldDataType = ModelFieldDataType = {}));\n/**\n * Model Field Implementation\n *\n * @typeParam T - holds the JS data type of the field; invoking the public methods changes this type accordingly\n * @example\n * string() => T = string | null\n * string().array() => T = Array<string | null> | null\n * string().array().required() => T = Array<string | null>\n * string().required().array().required() => T = Array<string>\n *\n * @param fieldType - stores the GraphQL data type of the field\n */\nfunction _field(fieldType) {\n const _meta = {\n lastInvokedMethod: null,\n };\n const data = {\n fieldType,\n required: false,\n array: false,\n arrayRequired: false,\n default: undefined,\n authorization: [],\n };\n const builder = {\n required() {\n if (_meta.lastInvokedMethod === 'array') {\n data.arrayRequired = true;\n }\n else {\n data.required = true;\n }\n _meta.lastInvokedMethod = 'required';\n return this;\n },\n array() {\n data.array = true;\n _meta.lastInvokedMethod = 'array';\n return this;\n },\n default(val) {\n data.default = val;\n _meta.lastInvokedMethod = 'default';\n return this;\n },\n authorization(callback) {\n const { resource: _, ...rest } = Authorization_1.allow;\n const rules = callback(rest);\n data.authorization = Array.isArray(rules) ? rules : [rules];\n _meta.lastInvokedMethod = 'authorization';\n return this;\n },\n ...(0, util_1.brand)(brandName),\n };\n // this double cast gives us a Subtyping Constraint i.e., hides `data` from the public API,\n // but makes it available internally when needed\n return { ...builder, data };\n}\n/**\n * A unique identifier scalar type. This scalar is serialized like a String but isn't meant to be human-readable.\n * If not specified on create operations, a ULID will be auto-generated service-side.\n * @returns ID field definition\n */\nfunction id() {\n return _field(ModelFieldType.Id);\n}\nexports.id = id;\n/**\n * A string scalar type that is represented server-side as a UTF-8 character sequence.\n * @returns string field definition\n */\nfunction string() {\n return _field(ModelFieldType.String);\n}\nexports.string = string;\n/**\n * An integer scalar type with a supported value range between -(2^31) and 2^31-1.\n * @returns integer field definition\n */\nfunction integer() {\n return _field(ModelFieldType.Integer);\n}\nexports.integer = integer;\n/**\n * A float scalar type following represented server-side as an IEEE 754 floating point value.\n * @returns float field definition\n */\nfunction float() {\n return _field(ModelFieldType.Float);\n}\nexports.float = float;\n/**\n * A boolean scalar type that can be either true or false.\n * @returns boolean field definition\n */\nfunction boolean() {\n return _field(ModelFieldType.Boolean);\n}\nexports.boolean = boolean;\n/**\n * A date scalar type that is represented server-side as an extended ISO 8601 date string in the format `YYYY-MM-DD`.\n * @returns date field definition\n */\nfunction date() {\n return _field(ModelFieldType.Date);\n}\nexports.date = date;\n/**\n * A time scalar type that is represented server-side as an extended ISO 8601 time string in the format `hh:mm:ss.sss`.\n * @returns time field definition\n */\nfunction time() {\n return _field(ModelFieldType.Time);\n}\nexports.time = time;\n/**\n * A date time scalar type that is represented server-side as an extended ISO 8601 date and time string in the format `YYYY-MM-DDThh:mm:ss.sssZ`.\n * @returns datetime field definition\n */\nfunction datetime() {\n return _field(ModelFieldType.DateTime);\n}\nexports.datetime = datetime;\n/**\n * A timestamp scalar type that is represented by an integer value of the number of seconds before or after `1970-01-01-T00:00Z`.\n * @returns timestamp field definition\n */\nfunction timestamp() {\n return _field(ModelFieldType.Timestamp);\n}\nexports.timestamp = timestamp;\n/**\n * An email scalar type that is represented server-side in the format `local-part@domain-part` as defined by RFC 822.\n * @returns email field definition\n */\nfunction email() {\n return _field(ModelFieldType.Email);\n}\nexports.email = email;\n/**\n * A JSON scalar type that is automatically parsed and loaded server-side as maps, lists, or scalar values\n * rather than as the literal input strings.\n * @returns JSON field definition\n */\nfunction json() {\n return _field(ModelFieldType.JSON);\n}\nexports.json = json;\n/**\n * A phone number scalar type thas is stored as a string server-side. Phone numbers can contain either spaces\n * or hyphens to separate digit groups. Phone numbers without a country code are assumed to be US/North American numbers adhering\n * to the North American Numbering Plan.\n * @returns phone number field definition\n */\nfunction phone() {\n return _field(ModelFieldType.Phone);\n}\nexports.phone = phone;\n/**\n * A URL scalar type as defined by RFC 1738. For example, https://www.amazon.com/dp/B000NZW3KC/ or mailto:example@example.com.\n * URLs must contain a schema (http, mailto) and can't contain two forward slashes (//) in the path part.\n * @returns URL field definition\n */\nfunction url() {\n return _field(ModelFieldType.Url);\n}\nexports.url = url;\n/**\n * A valid IPv4 or IPv6 address scalar type. IPv4 addresses are expected in quad-dotted notation (123.12.34.56). IPv6 addresses\n * are expected in non-bracketed, colon-separated format (1a2b:3c4b:🔢4567). You can include an optional CIDR suffix (123.45.67.89/16)\n * to indicate subnet mask.\n * @returns IP address field definition\n */\nfunction ipAddress() {\n return _field(ModelFieldType.IPAddress);\n}\nexports.ipAddress = ipAddress;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,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,CA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,CAAC;AACD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI,GAAG;AAChB,IAAI,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AACD,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,KAAK,GAAG;AACjB,IAAI,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC;AACD,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB;AACA;AACA;AACA;AACA;AACA,SAAS,GAAG,GAAG;AACf,IAAI,OAAO,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AACD,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS,GAAG;AACrB,IAAI,OAAO,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC;AACD,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.modelIndex = void 0;
|
|
4
5
|
const util_1 = require("./util");
|
|
@@ -31,3 +32,4 @@ function modelIndex(partitionKeyFieldName) {
|
|
|
31
32
|
return _modelIndex(partitionKeyFieldName);
|
|
32
33
|
}
|
|
33
34
|
exports.modelIndex = modelIndex;
|
|
35
|
+
//# sourceMappingURL=ModelIndex.js.map
|