@constructive-io/sdk 0.29.8 → 0.30.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/README.md +1 -0
- package/agent/orm/input-types.d.ts +96 -8
- package/api/orm/index.d.ts +5 -15
- package/api/orm/index.js +2 -2
- package/api/orm/input-types.d.ts +250 -231
- package/api/orm/models/index.d.ts +1 -1
- package/api/orm/models/index.js +3 -3
- package/api/orm/mutation/index.d.ts +11 -36
- package/api/orm/mutation/index.js +6 -30
- package/auth/orm/index.d.ts +10 -5
- package/auth/orm/input-types.d.ts +54 -45
- package/auth/orm/models/principal.d.ts +1 -10
- package/auth/orm/models/principal.js +0 -13
- package/auth/orm/mutation/index.d.ts +17 -9
- package/auth/orm/mutation/index.js +24 -12
- package/compute/orm/index.d.ts +76 -17
- package/compute/orm/index.js +56 -12
- package/compute/orm/input-types.d.ts +5893 -1343
- package/compute/orm/input-types.js +17 -3
- package/compute/orm/models/dbPreset.d.ts +54 -0
- package/compute/orm/models/dbPreset.js +104 -0
- package/compute/orm/models/functionGraphCommit.d.ts +2 -2
- package/compute/orm/models/functionGraphCommit.js +2 -2
- package/compute/orm/models/functionGraphObject.d.ts +2 -2
- package/compute/orm/models/functionGraphObject.js +2 -2
- package/compute/orm/models/functionGraphRef.d.ts +2 -2
- package/compute/orm/models/functionGraphRef.js +2 -2
- package/compute/orm/models/index.d.ts +28 -6
- package/compute/orm/models/index.js +57 -13
- package/compute/orm/models/infraCommit.d.ts +56 -0
- package/compute/orm/models/infraCommit.js +107 -0
- package/compute/orm/models/infraGetAllRecord.d.ts +30 -0
- package/compute/orm/models/infraGetAllRecord.js +59 -0
- package/compute/orm/models/infraObject.d.ts +56 -0
- package/compute/orm/models/infraObject.js +97 -0
- package/compute/orm/models/infraRef.d.ts +56 -0
- package/compute/orm/models/infraRef.js +107 -0
- package/compute/orm/models/infraStore.d.ts +54 -0
- package/compute/orm/models/infraStore.js +104 -0
- package/compute/orm/models/integrationProvider.d.ts +54 -0
- package/{modules/orm/models/configSecretsModule.js → compute/orm/models/integrationProvider.js} +27 -27
- package/compute/orm/models/namespace.d.ts +54 -0
- package/compute/orm/models/namespace.js +104 -0
- package/compute/orm/models/namespaceEvent.d.ts +56 -0
- package/compute/orm/models/{orgFunctionExecutionLog.js → namespaceEvent.js} +27 -27
- package/compute/orm/models/platformFunctionApiBinding.d.ts +54 -0
- package/compute/orm/models/platformFunctionApiBinding.js +104 -0
- package/compute/orm/models/platformFunctionDefinition.d.ts +54 -0
- package/compute/orm/models/platformFunctionDefinition.js +104 -0
- package/compute/orm/models/platformFunctionDeployment.d.ts +54 -0
- package/compute/orm/models/platformFunctionDeployment.js +104 -0
- package/compute/orm/models/platformFunctionDeploymentEvent.d.ts +56 -0
- package/compute/orm/models/platformFunctionDeploymentEvent.js +107 -0
- package/compute/orm/models/platformFunctionExecutionLog.d.ts +56 -0
- package/compute/orm/models/platformFunctionExecutionLog.js +107 -0
- package/compute/orm/models/platformFunctionInvocation.d.ts +56 -0
- package/compute/orm/models/platformFunctionInvocation.js +107 -0
- package/compute/orm/models/platformResource.d.ts +54 -0
- package/compute/orm/models/{secretDefinition.js → platformResource.js} +27 -27
- package/compute/orm/models/platformResourceDefinition.d.ts +54 -0
- package/compute/orm/models/platformResourceDefinition.js +104 -0
- package/compute/orm/models/platformResourceEvent.d.ts +56 -0
- package/compute/orm/models/{orgFunctionInvocation.js → platformResourceEvent.js} +27 -27
- package/compute/orm/models/platformResourceStatusCheck.d.ts +54 -0
- package/compute/orm/models/platformResourceStatusCheck.js +104 -0
- package/compute/orm/models/platformResourcesRequirementsState.d.ts +30 -0
- package/compute/orm/models/platformResourcesRequirementsState.js +59 -0
- package/compute/orm/models/platformResourcesResolvedRequirement.d.ts +30 -0
- package/compute/orm/models/platformResourcesResolvedRequirement.js +59 -0
- package/compute/orm/models/resourceDefinition.d.ts +54 -0
- package/compute/orm/models/resourceDefinition.js +104 -0
- package/compute/orm/models/resourceStatusCheck.d.ts +54 -0
- package/compute/orm/models/resourceStatusCheck.js +104 -0
- package/compute/orm/models/resourcesRequirementsState.d.ts +30 -0
- package/compute/orm/models/resourcesRequirementsState.js +59 -0
- package/compute/orm/models/resourcesResolvedRequirement.d.ts +30 -0
- package/compute/orm/models/resourcesResolvedRequirement.js +59 -0
- package/compute/orm/mutation/index.d.ts +33 -9
- package/compute/orm/mutation/index.js +48 -12
- package/config/orm/index.d.ts +42 -16
- package/config/orm/index.js +8 -2
- package/config/orm/input-types.d.ts +595 -154
- package/config/orm/models/config.d.ts +54 -0
- package/{modules/orm/models/configSecretsOrgModule.js → config/orm/models/config.js} +27 -27
- package/config/orm/models/index.d.ts +4 -1
- package/config/orm/models/index.js +9 -3
- package/config/orm/models/platformInternalSecret.d.ts +36 -0
- package/config/orm/models/platformInternalSecret.js +80 -0
- package/config/orm/models/platformSecret.d.ts +36 -0
- package/config/orm/models/platformSecret.js +80 -0
- package/config/orm/models/secret.d.ts +36 -0
- package/config/orm/models/secret.js +80 -0
- package/config/orm/mutation/index.d.ts +56 -24
- package/config/orm/mutation/index.js +78 -30
- package/esm/agent/orm/input-types.d.ts +96 -8
- package/esm/api/orm/index.d.ts +5 -15
- package/esm/api/orm/index.js +2 -2
- package/esm/api/orm/input-types.d.ts +250 -231
- package/esm/api/orm/models/index.d.ts +1 -1
- package/esm/api/orm/models/index.js +1 -1
- package/esm/api/orm/mutation/index.d.ts +11 -36
- package/esm/api/orm/mutation/index.js +6 -30
- package/esm/auth/orm/index.d.ts +10 -5
- package/esm/auth/orm/input-types.d.ts +54 -45
- package/esm/auth/orm/models/principal.d.ts +1 -10
- package/esm/auth/orm/models/principal.js +1 -14
- package/esm/auth/orm/mutation/index.d.ts +17 -9
- package/esm/auth/orm/mutation/index.js +24 -12
- package/esm/compute/orm/index.d.ts +76 -17
- package/esm/compute/orm/index.js +56 -12
- package/esm/compute/orm/input-types.d.ts +5893 -1343
- package/esm/compute/orm/input-types.js +17 -3
- package/esm/compute/orm/models/dbPreset.d.ts +54 -0
- package/esm/compute/orm/models/dbPreset.js +100 -0
- package/esm/compute/orm/models/functionGraphCommit.d.ts +2 -2
- package/esm/compute/orm/models/functionGraphCommit.js +2 -2
- package/esm/compute/orm/models/functionGraphObject.d.ts +2 -2
- package/esm/compute/orm/models/functionGraphObject.js +2 -2
- package/esm/compute/orm/models/functionGraphRef.d.ts +2 -2
- package/esm/compute/orm/models/functionGraphRef.js +2 -2
- package/esm/compute/orm/models/index.d.ts +28 -6
- package/esm/compute/orm/models/index.js +28 -6
- package/esm/compute/orm/models/infraCommit.d.ts +56 -0
- package/esm/compute/orm/models/infraCommit.js +103 -0
- package/esm/compute/orm/models/infraGetAllRecord.d.ts +30 -0
- package/esm/compute/orm/models/infraGetAllRecord.js +55 -0
- package/esm/compute/orm/models/infraObject.d.ts +56 -0
- package/esm/compute/orm/models/infraObject.js +93 -0
- package/esm/compute/orm/models/infraRef.d.ts +56 -0
- package/esm/compute/orm/models/infraRef.js +103 -0
- package/esm/compute/orm/models/infraStore.d.ts +54 -0
- package/esm/compute/orm/models/infraStore.js +100 -0
- package/esm/compute/orm/models/integrationProvider.d.ts +54 -0
- package/esm/compute/orm/models/integrationProvider.js +100 -0
- package/esm/compute/orm/models/namespace.d.ts +54 -0
- package/esm/compute/orm/models/namespace.js +100 -0
- package/esm/compute/orm/models/namespaceEvent.d.ts +56 -0
- package/esm/compute/orm/models/{orgFunctionExecutionLog.js → namespaceEvent.js} +25 -25
- package/esm/compute/orm/models/platformFunctionApiBinding.d.ts +54 -0
- package/esm/compute/orm/models/platformFunctionApiBinding.js +100 -0
- package/esm/compute/orm/models/platformFunctionDefinition.d.ts +54 -0
- package/esm/compute/orm/models/platformFunctionDefinition.js +100 -0
- package/esm/compute/orm/models/platformFunctionDeployment.d.ts +54 -0
- package/esm/compute/orm/models/platformFunctionDeployment.js +100 -0
- package/esm/compute/orm/models/platformFunctionDeploymentEvent.d.ts +56 -0
- package/esm/compute/orm/models/platformFunctionDeploymentEvent.js +103 -0
- package/esm/compute/orm/models/platformFunctionExecutionLog.d.ts +56 -0
- package/esm/compute/orm/models/platformFunctionExecutionLog.js +103 -0
- package/esm/compute/orm/models/platformFunctionInvocation.d.ts +56 -0
- package/esm/compute/orm/models/platformFunctionInvocation.js +103 -0
- package/esm/compute/orm/models/platformResource.d.ts +54 -0
- package/esm/compute/orm/models/{secretDefinition.js → platformResource.js} +25 -25
- package/esm/compute/orm/models/platformResourceDefinition.d.ts +54 -0
- package/esm/compute/orm/models/platformResourceDefinition.js +100 -0
- package/esm/compute/orm/models/platformResourceEvent.d.ts +56 -0
- package/esm/compute/orm/models/{orgFunctionInvocation.js → platformResourceEvent.js} +25 -25
- package/esm/compute/orm/models/platformResourceStatusCheck.d.ts +54 -0
- package/esm/compute/orm/models/platformResourceStatusCheck.js +100 -0
- package/esm/compute/orm/models/platformResourcesRequirementsState.d.ts +30 -0
- package/esm/compute/orm/models/platformResourcesRequirementsState.js +55 -0
- package/esm/compute/orm/models/platformResourcesResolvedRequirement.d.ts +30 -0
- package/esm/compute/orm/models/platformResourcesResolvedRequirement.js +55 -0
- package/esm/compute/orm/models/resourceDefinition.d.ts +54 -0
- package/esm/{modules/orm/models/configSecretsOrgModule.js → compute/orm/models/resourceDefinition.js} +25 -25
- package/esm/compute/orm/models/resourceStatusCheck.d.ts +54 -0
- package/esm/compute/orm/models/resourceStatusCheck.js +100 -0
- package/esm/compute/orm/models/resourcesRequirementsState.d.ts +30 -0
- package/esm/compute/orm/models/resourcesRequirementsState.js +55 -0
- package/esm/compute/orm/models/resourcesResolvedRequirement.d.ts +30 -0
- package/esm/compute/orm/models/resourcesResolvedRequirement.js +55 -0
- package/esm/compute/orm/mutation/index.d.ts +33 -9
- package/esm/compute/orm/mutation/index.js +48 -12
- package/esm/config/orm/index.d.ts +42 -16
- package/esm/config/orm/index.js +8 -2
- package/esm/config/orm/input-types.d.ts +595 -154
- package/esm/config/orm/models/config.d.ts +54 -0
- package/esm/{modules/orm/models/configSecretsModule.js → config/orm/models/config.js} +25 -25
- package/esm/config/orm/models/index.d.ts +4 -1
- package/esm/config/orm/models/index.js +4 -1
- package/esm/config/orm/models/platformInternalSecret.d.ts +36 -0
- package/esm/config/orm/models/platformInternalSecret.js +76 -0
- package/esm/config/orm/models/platformSecret.d.ts +36 -0
- package/esm/config/orm/models/platformSecret.js +76 -0
- package/esm/config/orm/models/secret.d.ts +36 -0
- package/esm/config/orm/models/secret.js +76 -0
- package/esm/config/orm/mutation/index.d.ts +56 -24
- package/esm/config/orm/mutation/index.js +78 -30
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/infra/index.d.ts +5 -0
- package/esm/infra/index.js +5 -0
- package/esm/infra/orm/client.d.ts +97 -0
- package/esm/infra/orm/client.js +145 -0
- package/esm/infra/orm/index.d.ts +74 -0
- package/esm/infra/orm/index.js +61 -0
- package/esm/infra/orm/input-types.d.ts +1953 -0
- package/esm/infra/orm/input-types.js +2 -0
- package/esm/infra/orm/models/dbPreset.d.ts +54 -0
- package/esm/infra/orm/models/dbPreset.js +100 -0
- package/esm/infra/orm/models/index.d.ts +15 -0
- package/esm/infra/orm/models/index.js +15 -0
- package/esm/infra/orm/models/infraCommit.d.ts +56 -0
- package/esm/infra/orm/models/infraCommit.js +103 -0
- package/esm/infra/orm/models/infraGetAllRecord.d.ts +30 -0
- package/esm/infra/orm/models/infraGetAllRecord.js +55 -0
- package/esm/infra/orm/models/infraObject.d.ts +56 -0
- package/esm/infra/orm/models/infraObject.js +93 -0
- package/esm/infra/orm/models/infraRef.d.ts +56 -0
- package/esm/infra/orm/models/infraRef.js +103 -0
- package/esm/infra/orm/models/infraStore.d.ts +54 -0
- package/esm/infra/orm/models/infraStore.js +100 -0
- package/esm/infra/orm/models/namespace.d.ts +54 -0
- package/esm/infra/orm/models/namespace.js +100 -0
- package/esm/infra/orm/models/namespaceEvent.d.ts +56 -0
- package/esm/infra/orm/models/namespaceEvent.js +103 -0
- package/esm/infra/orm/models/platformNamespace.d.ts +54 -0
- package/esm/{config/orm/models/platformConfigDefinition.js → infra/orm/models/platformNamespace.js} +25 -25
- package/esm/infra/orm/models/platformNamespaceEvent.d.ts +56 -0
- package/esm/infra/orm/models/platformNamespaceEvent.js +103 -0
- package/esm/infra/orm/mutation/index.d.ts +50 -0
- package/esm/infra/orm/mutation/index.js +54 -0
- package/esm/infra/orm/query-builder.d.ts +110 -0
- package/esm/infra/orm/query-builder.js +705 -0
- package/esm/infra/orm/realtime.d.ts +142 -0
- package/esm/infra/orm/realtime.js +100 -0
- package/esm/infra/orm/select-types.d.ts +125 -0
- package/esm/infra/orm/select-types.js +1 -0
- package/esm/infra/orm/types.d.ts +6 -0
- package/esm/infra/orm/types.js +7 -0
- package/esm/modules/orm/index.d.ts +48 -38
- package/esm/modules/orm/index.js +48 -38
- package/esm/modules/orm/input-types.d.ts +5378 -4022
- package/esm/modules/orm/input-types.js +1 -0
- package/esm/modules/orm/models/dbPool.d.ts +54 -0
- package/esm/modules/orm/models/dbPool.js +100 -0
- package/esm/modules/orm/models/dbPoolConfig.d.ts +54 -0
- package/esm/modules/orm/models/dbPoolConfig.js +100 -0
- package/esm/modules/orm/models/dbPresetModule.d.ts +54 -0
- package/esm/modules/orm/models/dbPresetModule.js +100 -0
- package/esm/modules/orm/models/index.d.ts +24 -19
- package/esm/modules/orm/models/index.js +24 -19
- package/esm/modules/orm/models/infraConfigModule.d.ts +54 -0
- package/esm/modules/orm/models/infraConfigModule.js +100 -0
- package/esm/modules/orm/models/infraSecretsModule.d.ts +54 -0
- package/esm/modules/orm/models/infraSecretsModule.js +100 -0
- package/esm/modules/orm/models/integrationProvidersModule.d.ts +54 -0
- package/esm/modules/orm/models/integrationProvidersModule.js +100 -0
- package/esm/modules/orm/models/internalSecretsModule.d.ts +54 -0
- package/esm/modules/orm/models/internalSecretsModule.js +100 -0
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/infra/index.d.ts +5 -0
- package/infra/index.js +21 -0
- package/infra/orm/client.d.ts +97 -0
- package/infra/orm/client.js +152 -0
- package/infra/orm/index.d.ts +74 -0
- package/infra/orm/index.js +83 -0
- package/infra/orm/input-types.d.ts +1953 -0
- package/infra/orm/input-types.js +5 -0
- package/infra/orm/models/dbPreset.d.ts +54 -0
- package/infra/orm/models/dbPreset.js +104 -0
- package/infra/orm/models/index.d.ts +15 -0
- package/infra/orm/models/index.js +28 -0
- package/infra/orm/models/infraCommit.d.ts +56 -0
- package/infra/orm/models/infraCommit.js +107 -0
- package/infra/orm/models/infraGetAllRecord.d.ts +30 -0
- package/infra/orm/models/infraGetAllRecord.js +59 -0
- package/infra/orm/models/infraObject.d.ts +56 -0
- package/infra/orm/models/infraObject.js +97 -0
- package/infra/orm/models/infraRef.d.ts +56 -0
- package/infra/orm/models/infraRef.js +107 -0
- package/infra/orm/models/infraStore.d.ts +54 -0
- package/infra/orm/models/infraStore.js +104 -0
- package/infra/orm/models/namespace.d.ts +54 -0
- package/infra/orm/models/namespace.js +104 -0
- package/infra/orm/models/namespaceEvent.d.ts +56 -0
- package/infra/orm/models/namespaceEvent.js +107 -0
- package/infra/orm/models/platformNamespace.d.ts +54 -0
- package/infra/orm/models/platformNamespace.js +104 -0
- package/infra/orm/models/platformNamespaceEvent.d.ts +56 -0
- package/{config/orm/models/platformConfigDefinition.js → infra/orm/models/platformNamespaceEvent.js} +30 -27
- package/infra/orm/mutation/index.d.ts +50 -0
- package/infra/orm/mutation/index.js +57 -0
- package/infra/orm/query-builder.d.ts +110 -0
- package/infra/orm/query-builder.js +757 -0
- package/infra/orm/realtime.d.ts +142 -0
- package/infra/orm/realtime.js +104 -0
- package/infra/orm/select-types.d.ts +125 -0
- package/infra/orm/select-types.js +2 -0
- package/infra/orm/types.d.ts +6 -0
- package/infra/orm/types.js +23 -0
- package/modules/orm/index.d.ts +48 -38
- package/modules/orm/index.js +48 -38
- package/modules/orm/input-types.d.ts +5378 -4022
- package/modules/orm/input-types.js +1 -0
- package/modules/orm/models/dbPool.d.ts +54 -0
- package/modules/orm/models/dbPool.js +104 -0
- package/modules/orm/models/dbPoolConfig.d.ts +54 -0
- package/modules/orm/models/dbPoolConfig.js +104 -0
- package/modules/orm/models/dbPresetModule.d.ts +54 -0
- package/modules/orm/models/dbPresetModule.js +104 -0
- package/modules/orm/models/index.d.ts +24 -19
- package/modules/orm/models/index.js +50 -40
- package/modules/orm/models/infraConfigModule.d.ts +54 -0
- package/modules/orm/models/infraConfigModule.js +104 -0
- package/modules/orm/models/infraSecretsModule.d.ts +54 -0
- package/modules/orm/models/infraSecretsModule.js +104 -0
- package/modules/orm/models/integrationProvidersModule.d.ts +54 -0
- package/modules/orm/models/integrationProvidersModule.js +104 -0
- package/modules/orm/models/internalSecretsModule.d.ts +54 -0
- package/modules/orm/models/internalSecretsModule.js +104 -0
- package/package.json +6 -6
- package/compute/orm/models/orgFunctionExecutionLog.d.ts +0 -56
- package/compute/orm/models/orgFunctionInvocation.d.ts +0 -56
- package/compute/orm/models/secretDefinition.d.ts +0 -54
- package/config/orm/models/platformConfigDefinition.d.ts +0 -54
- package/esm/compute/orm/models/orgFunctionExecutionLog.d.ts +0 -56
- package/esm/compute/orm/models/orgFunctionInvocation.d.ts +0 -56
- package/esm/compute/orm/models/secretDefinition.d.ts +0 -54
- package/esm/config/orm/models/platformConfigDefinition.d.ts +0 -54
- package/esm/modules/orm/models/configSecretsModule.d.ts +0 -54
- package/esm/modules/orm/models/configSecretsOrgModule.d.ts +0 -54
- package/modules/orm/models/configSecretsModule.d.ts +0 -54
- package/modules/orm/models/configSecretsOrgModule.d.ts +0 -54
|
@@ -6,30 +6,42 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { PlatformSecretsDelInput,
|
|
9
|
+
import type { PlatformInternalSecretsDelInput, PlatformSecretsDelInput, _SecretsDelInput, PlatformInternalSecretsRemoveArrayInput, PlatformSecretsRemoveArrayInput, _SecretsRemoveArrayInput, PlatformInternalSecretsRotateInput, PlatformInternalSecretsSetInput, PlatformSecretsRotateInput, _SecretsRotateInput, PlatformSecretsSetInput, _SecretsSetInput, ProvisionBucketInput, PlatformInternalSecretsDelPayload, PlatformSecretsDelPayload, _SecretsDelPayload, PlatformInternalSecretsRemoveArrayPayload, PlatformSecretsRemoveArrayPayload, _SecretsRemoveArrayPayload, PlatformInternalSecretsRotatePayload, PlatformInternalSecretsSetPayload, PlatformSecretsRotatePayload, _SecretsRotatePayload, PlatformSecretsSetPayload, _SecretsSetPayload, ProvisionBucketPayload, PlatformInternalSecretsDelPayloadSelect, PlatformSecretsDelPayloadSelect, _SecretsDelPayloadSelect, PlatformInternalSecretsRemoveArrayPayloadSelect, PlatformSecretsRemoveArrayPayloadSelect, _SecretsRemoveArrayPayloadSelect, PlatformInternalSecretsRotatePayloadSelect, PlatformInternalSecretsSetPayloadSelect, PlatformSecretsRotatePayloadSelect, _SecretsRotatePayloadSelect, PlatformSecretsSetPayloadSelect, _SecretsSetPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
|
+
export interface PlatformInternalSecretsDelVariables {
|
|
11
|
+
input: PlatformInternalSecretsDelInput;
|
|
12
|
+
}
|
|
10
13
|
export interface PlatformSecretsDelVariables {
|
|
11
14
|
input: PlatformSecretsDelInput;
|
|
12
15
|
}
|
|
13
|
-
export interface
|
|
14
|
-
input:
|
|
16
|
+
export interface _secretsDelVariables {
|
|
17
|
+
input: _SecretsDelInput;
|
|
18
|
+
}
|
|
19
|
+
export interface PlatformInternalSecretsRemoveArrayVariables {
|
|
20
|
+
input: PlatformInternalSecretsRemoveArrayInput;
|
|
15
21
|
}
|
|
16
22
|
export interface PlatformSecretsRemoveArrayVariables {
|
|
17
23
|
input: PlatformSecretsRemoveArrayInput;
|
|
18
24
|
}
|
|
19
|
-
export interface
|
|
20
|
-
input:
|
|
25
|
+
export interface _secretsRemoveArrayVariables {
|
|
26
|
+
input: _SecretsRemoveArrayInput;
|
|
27
|
+
}
|
|
28
|
+
export interface PlatformInternalSecretsRotateVariables {
|
|
29
|
+
input: PlatformInternalSecretsRotateInput;
|
|
30
|
+
}
|
|
31
|
+
export interface PlatformInternalSecretsSetVariables {
|
|
32
|
+
input: PlatformInternalSecretsSetInput;
|
|
21
33
|
}
|
|
22
34
|
export interface PlatformSecretsRotateVariables {
|
|
23
35
|
input: PlatformSecretsRotateInput;
|
|
24
36
|
}
|
|
37
|
+
export interface _secretsRotateVariables {
|
|
38
|
+
input: _SecretsRotateInput;
|
|
39
|
+
}
|
|
25
40
|
export interface PlatformSecretsSetVariables {
|
|
26
41
|
input: PlatformSecretsSetInput;
|
|
27
42
|
}
|
|
28
|
-
export interface
|
|
29
|
-
input:
|
|
30
|
-
}
|
|
31
|
-
export interface OrgSecretsSetVariables {
|
|
32
|
-
input: OrgSecretsSetInput;
|
|
43
|
+
export interface _secretsSetVariables {
|
|
44
|
+
input: _SecretsSetInput;
|
|
33
45
|
}
|
|
34
46
|
/**
|
|
35
47
|
* Variables for provisionBucket
|
|
@@ -42,45 +54,65 @@ export interface ProvisionBucketVariables {
|
|
|
42
54
|
input: ProvisionBucketInput;
|
|
43
55
|
}
|
|
44
56
|
export declare function createMutationOperations(client: OrmClient): {
|
|
57
|
+
platformInternalSecretsDel: <S extends PlatformInternalSecretsDelPayloadSelect>(args: PlatformInternalSecretsDelVariables, options: {
|
|
58
|
+
select: S;
|
|
59
|
+
} & StrictSelect<S, PlatformInternalSecretsDelPayloadSelect>) => QueryBuilder<{
|
|
60
|
+
platformInternalSecretsDel: InferSelectResult<PlatformInternalSecretsDelPayload, S> | null;
|
|
61
|
+
}>;
|
|
45
62
|
platformSecretsDel: <S extends PlatformSecretsDelPayloadSelect>(args: PlatformSecretsDelVariables, options: {
|
|
46
63
|
select: S;
|
|
47
64
|
} & StrictSelect<S, PlatformSecretsDelPayloadSelect>) => QueryBuilder<{
|
|
48
65
|
platformSecretsDel: InferSelectResult<PlatformSecretsDelPayload, S> | null;
|
|
49
66
|
}>;
|
|
50
|
-
|
|
67
|
+
_secretsDel: <S extends _SecretsDelPayloadSelect>(args: _secretsDelVariables, options: {
|
|
68
|
+
select: S;
|
|
69
|
+
} & StrictSelect<S, _SecretsDelPayloadSelect>) => QueryBuilder<{
|
|
70
|
+
_secretsDel: InferSelectResult<_SecretsDelPayload, S> | null;
|
|
71
|
+
}>;
|
|
72
|
+
platformInternalSecretsRemoveArray: <S extends PlatformInternalSecretsRemoveArrayPayloadSelect>(args: PlatformInternalSecretsRemoveArrayVariables, options: {
|
|
51
73
|
select: S;
|
|
52
|
-
} & StrictSelect<S,
|
|
53
|
-
|
|
74
|
+
} & StrictSelect<S, PlatformInternalSecretsRemoveArrayPayloadSelect>) => QueryBuilder<{
|
|
75
|
+
platformInternalSecretsRemoveArray: InferSelectResult<PlatformInternalSecretsRemoveArrayPayload, S> | null;
|
|
54
76
|
}>;
|
|
55
77
|
platformSecretsRemoveArray: <S extends PlatformSecretsRemoveArrayPayloadSelect>(args: PlatformSecretsRemoveArrayVariables, options: {
|
|
56
78
|
select: S;
|
|
57
79
|
} & StrictSelect<S, PlatformSecretsRemoveArrayPayloadSelect>) => QueryBuilder<{
|
|
58
80
|
platformSecretsRemoveArray: InferSelectResult<PlatformSecretsRemoveArrayPayload, S> | null;
|
|
59
81
|
}>;
|
|
60
|
-
|
|
82
|
+
_secretsRemoveArray: <S extends _SecretsRemoveArrayPayloadSelect>(args: _secretsRemoveArrayVariables, options: {
|
|
83
|
+
select: S;
|
|
84
|
+
} & StrictSelect<S, _SecretsRemoveArrayPayloadSelect>) => QueryBuilder<{
|
|
85
|
+
_secretsRemoveArray: InferSelectResult<_SecretsRemoveArrayPayload, S> | null;
|
|
86
|
+
}>;
|
|
87
|
+
platformInternalSecretsRotate: <S extends PlatformInternalSecretsRotatePayloadSelect>(args: PlatformInternalSecretsRotateVariables, options: {
|
|
88
|
+
select: S;
|
|
89
|
+
} & StrictSelect<S, PlatformInternalSecretsRotatePayloadSelect>) => QueryBuilder<{
|
|
90
|
+
platformInternalSecretsRotate: InferSelectResult<PlatformInternalSecretsRotatePayload, S> | null;
|
|
91
|
+
}>;
|
|
92
|
+
platformInternalSecretsSet: <S extends PlatformInternalSecretsSetPayloadSelect>(args: PlatformInternalSecretsSetVariables, options: {
|
|
61
93
|
select: S;
|
|
62
|
-
} & StrictSelect<S,
|
|
63
|
-
|
|
94
|
+
} & StrictSelect<S, PlatformInternalSecretsSetPayloadSelect>) => QueryBuilder<{
|
|
95
|
+
platformInternalSecretsSet: InferSelectResult<PlatformInternalSecretsSetPayload, S> | null;
|
|
64
96
|
}>;
|
|
65
97
|
platformSecretsRotate: <S extends PlatformSecretsRotatePayloadSelect>(args: PlatformSecretsRotateVariables, options: {
|
|
66
98
|
select: S;
|
|
67
99
|
} & StrictSelect<S, PlatformSecretsRotatePayloadSelect>) => QueryBuilder<{
|
|
68
100
|
platformSecretsRotate: InferSelectResult<PlatformSecretsRotatePayload, S> | null;
|
|
69
101
|
}>;
|
|
102
|
+
_secretsRotate: <S extends _SecretsRotatePayloadSelect>(args: _secretsRotateVariables, options: {
|
|
103
|
+
select: S;
|
|
104
|
+
} & StrictSelect<S, _SecretsRotatePayloadSelect>) => QueryBuilder<{
|
|
105
|
+
_secretsRotate: InferSelectResult<_SecretsRotatePayload, S> | null;
|
|
106
|
+
}>;
|
|
70
107
|
platformSecretsSet: <S extends PlatformSecretsSetPayloadSelect>(args: PlatformSecretsSetVariables, options: {
|
|
71
108
|
select: S;
|
|
72
109
|
} & StrictSelect<S, PlatformSecretsSetPayloadSelect>) => QueryBuilder<{
|
|
73
110
|
platformSecretsSet: InferSelectResult<PlatformSecretsSetPayload, S> | null;
|
|
74
111
|
}>;
|
|
75
|
-
|
|
76
|
-
select: S;
|
|
77
|
-
} & StrictSelect<S, OrgSecretsRotatePayloadSelect>) => QueryBuilder<{
|
|
78
|
-
orgSecretsRotate: InferSelectResult<OrgSecretsRotatePayload, S> | null;
|
|
79
|
-
}>;
|
|
80
|
-
orgSecretsSet: <S extends OrgSecretsSetPayloadSelect>(args: OrgSecretsSetVariables, options: {
|
|
112
|
+
_secretsSet: <S extends _SecretsSetPayloadSelect>(args: _secretsSetVariables, options: {
|
|
81
113
|
select: S;
|
|
82
|
-
} & StrictSelect<S,
|
|
83
|
-
|
|
114
|
+
} & StrictSelect<S, _SecretsSetPayloadSelect>) => QueryBuilder<{
|
|
115
|
+
_secretsSet: InferSelectResult<_SecretsSetPayload, S> | null;
|
|
84
116
|
}>;
|
|
85
117
|
provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
|
|
86
118
|
select: S;
|
|
@@ -2,6 +2,18 @@ import { QueryBuilder, buildCustomDocument } from '../query-builder';
|
|
|
2
2
|
import { connectionFieldsMap } from '../input-types';
|
|
3
3
|
export function createMutationOperations(client) {
|
|
4
4
|
return {
|
|
5
|
+
platformInternalSecretsDel: (args, options) => new QueryBuilder({
|
|
6
|
+
client,
|
|
7
|
+
operation: 'mutation',
|
|
8
|
+
operationName: 'PlatformInternalSecretsDel',
|
|
9
|
+
fieldName: 'platformInternalSecretsDel',
|
|
10
|
+
...buildCustomDocument('mutation', 'PlatformInternalSecretsDel', 'platformInternalSecretsDel', options.select, args, [
|
|
11
|
+
{
|
|
12
|
+
name: 'input',
|
|
13
|
+
type: 'PlatformInternalSecretsDelInput!',
|
|
14
|
+
},
|
|
15
|
+
], connectionFieldsMap, 'PlatformInternalSecretsDelPayload'),
|
|
16
|
+
}),
|
|
5
17
|
platformSecretsDel: (args, options) => new QueryBuilder({
|
|
6
18
|
client,
|
|
7
19
|
operation: 'mutation',
|
|
@@ -14,17 +26,29 @@ export function createMutationOperations(client) {
|
|
|
14
26
|
},
|
|
15
27
|
], connectionFieldsMap, 'PlatformSecretsDelPayload'),
|
|
16
28
|
}),
|
|
17
|
-
|
|
29
|
+
_secretsDel: (args, options) => new QueryBuilder({
|
|
30
|
+
client,
|
|
31
|
+
operation: 'mutation',
|
|
32
|
+
operationName: '_secretsDel',
|
|
33
|
+
fieldName: '_secretsDel',
|
|
34
|
+
...buildCustomDocument('mutation', '_secretsDel', '_secretsDel', options.select, args, [
|
|
35
|
+
{
|
|
36
|
+
name: 'input',
|
|
37
|
+
type: '_SecretsDelInput!',
|
|
38
|
+
},
|
|
39
|
+
], connectionFieldsMap, '_SecretsDelPayload'),
|
|
40
|
+
}),
|
|
41
|
+
platformInternalSecretsRemoveArray: (args, options) => new QueryBuilder({
|
|
18
42
|
client,
|
|
19
43
|
operation: 'mutation',
|
|
20
|
-
operationName: '
|
|
21
|
-
fieldName: '
|
|
22
|
-
...buildCustomDocument('mutation', '
|
|
44
|
+
operationName: 'PlatformInternalSecretsRemoveArray',
|
|
45
|
+
fieldName: 'platformInternalSecretsRemoveArray',
|
|
46
|
+
...buildCustomDocument('mutation', 'PlatformInternalSecretsRemoveArray', 'platformInternalSecretsRemoveArray', options.select, args, [
|
|
23
47
|
{
|
|
24
48
|
name: 'input',
|
|
25
|
-
type: '
|
|
49
|
+
type: 'PlatformInternalSecretsRemoveArrayInput!',
|
|
26
50
|
},
|
|
27
|
-
], connectionFieldsMap, '
|
|
51
|
+
], connectionFieldsMap, 'PlatformInternalSecretsRemoveArrayPayload'),
|
|
28
52
|
}),
|
|
29
53
|
platformSecretsRemoveArray: (args, options) => new QueryBuilder({
|
|
30
54
|
client,
|
|
@@ -38,17 +62,41 @@ export function createMutationOperations(client) {
|
|
|
38
62
|
},
|
|
39
63
|
], connectionFieldsMap, 'PlatformSecretsRemoveArrayPayload'),
|
|
40
64
|
}),
|
|
41
|
-
|
|
65
|
+
_secretsRemoveArray: (args, options) => new QueryBuilder({
|
|
66
|
+
client,
|
|
67
|
+
operation: 'mutation',
|
|
68
|
+
operationName: '_secretsRemoveArray',
|
|
69
|
+
fieldName: '_secretsRemoveArray',
|
|
70
|
+
...buildCustomDocument('mutation', '_secretsRemoveArray', '_secretsRemoveArray', options.select, args, [
|
|
71
|
+
{
|
|
72
|
+
name: 'input',
|
|
73
|
+
type: '_SecretsRemoveArrayInput!',
|
|
74
|
+
},
|
|
75
|
+
], connectionFieldsMap, '_SecretsRemoveArrayPayload'),
|
|
76
|
+
}),
|
|
77
|
+
platformInternalSecretsRotate: (args, options) => new QueryBuilder({
|
|
42
78
|
client,
|
|
43
79
|
operation: 'mutation',
|
|
44
|
-
operationName: '
|
|
45
|
-
fieldName: '
|
|
46
|
-
...buildCustomDocument('mutation', '
|
|
80
|
+
operationName: 'PlatformInternalSecretsRotate',
|
|
81
|
+
fieldName: 'platformInternalSecretsRotate',
|
|
82
|
+
...buildCustomDocument('mutation', 'PlatformInternalSecretsRotate', 'platformInternalSecretsRotate', options.select, args, [
|
|
47
83
|
{
|
|
48
84
|
name: 'input',
|
|
49
|
-
type: '
|
|
85
|
+
type: 'PlatformInternalSecretsRotateInput!',
|
|
50
86
|
},
|
|
51
|
-
], connectionFieldsMap, '
|
|
87
|
+
], connectionFieldsMap, 'PlatformInternalSecretsRotatePayload'),
|
|
88
|
+
}),
|
|
89
|
+
platformInternalSecretsSet: (args, options) => new QueryBuilder({
|
|
90
|
+
client,
|
|
91
|
+
operation: 'mutation',
|
|
92
|
+
operationName: 'PlatformInternalSecretsSet',
|
|
93
|
+
fieldName: 'platformInternalSecretsSet',
|
|
94
|
+
...buildCustomDocument('mutation', 'PlatformInternalSecretsSet', 'platformInternalSecretsSet', options.select, args, [
|
|
95
|
+
{
|
|
96
|
+
name: 'input',
|
|
97
|
+
type: 'PlatformInternalSecretsSetInput!',
|
|
98
|
+
},
|
|
99
|
+
], connectionFieldsMap, 'PlatformInternalSecretsSetPayload'),
|
|
52
100
|
}),
|
|
53
101
|
platformSecretsRotate: (args, options) => new QueryBuilder({
|
|
54
102
|
client,
|
|
@@ -62,41 +110,41 @@ export function createMutationOperations(client) {
|
|
|
62
110
|
},
|
|
63
111
|
], connectionFieldsMap, 'PlatformSecretsRotatePayload'),
|
|
64
112
|
}),
|
|
65
|
-
|
|
113
|
+
_secretsRotate: (args, options) => new QueryBuilder({
|
|
66
114
|
client,
|
|
67
115
|
operation: 'mutation',
|
|
68
|
-
operationName: '
|
|
69
|
-
fieldName: '
|
|
70
|
-
...buildCustomDocument('mutation', '
|
|
116
|
+
operationName: '_secretsRotate',
|
|
117
|
+
fieldName: '_secretsRotate',
|
|
118
|
+
...buildCustomDocument('mutation', '_secretsRotate', '_secretsRotate', options.select, args, [
|
|
71
119
|
{
|
|
72
120
|
name: 'input',
|
|
73
|
-
type: '
|
|
121
|
+
type: '_SecretsRotateInput!',
|
|
74
122
|
},
|
|
75
|
-
], connectionFieldsMap, '
|
|
123
|
+
], connectionFieldsMap, '_SecretsRotatePayload'),
|
|
76
124
|
}),
|
|
77
|
-
|
|
125
|
+
platformSecretsSet: (args, options) => new QueryBuilder({
|
|
78
126
|
client,
|
|
79
127
|
operation: 'mutation',
|
|
80
|
-
operationName: '
|
|
81
|
-
fieldName: '
|
|
82
|
-
...buildCustomDocument('mutation', '
|
|
128
|
+
operationName: 'PlatformSecretsSet',
|
|
129
|
+
fieldName: 'platformSecretsSet',
|
|
130
|
+
...buildCustomDocument('mutation', 'PlatformSecretsSet', 'platformSecretsSet', options.select, args, [
|
|
83
131
|
{
|
|
84
132
|
name: 'input',
|
|
85
|
-
type: '
|
|
133
|
+
type: 'PlatformSecretsSetInput!',
|
|
86
134
|
},
|
|
87
|
-
], connectionFieldsMap, '
|
|
135
|
+
], connectionFieldsMap, 'PlatformSecretsSetPayload'),
|
|
88
136
|
}),
|
|
89
|
-
|
|
137
|
+
_secretsSet: (args, options) => new QueryBuilder({
|
|
90
138
|
client,
|
|
91
139
|
operation: 'mutation',
|
|
92
|
-
operationName: '
|
|
93
|
-
fieldName: '
|
|
94
|
-
...buildCustomDocument('mutation', '
|
|
140
|
+
operationName: '_secretsSet',
|
|
141
|
+
fieldName: '_secretsSet',
|
|
142
|
+
...buildCustomDocument('mutation', '_secretsSet', '_secretsSet', options.select, args, [
|
|
95
143
|
{
|
|
96
144
|
name: 'input',
|
|
97
|
-
type: '
|
|
145
|
+
type: '_SecretsSetInput!',
|
|
98
146
|
},
|
|
99
|
-
], connectionFieldsMap, '
|
|
147
|
+
], connectionFieldsMap, '_SecretsSetPayload'),
|
|
100
148
|
}),
|
|
101
149
|
provisionBucket: (args, options) => new QueryBuilder({
|
|
102
150
|
client,
|
package/esm/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * as api from './api';
|
|
|
12
12
|
export * as auth from './auth';
|
|
13
13
|
export * as compute from './compute';
|
|
14
14
|
export * as config from './config';
|
|
15
|
+
export * as infra from './infra';
|
|
15
16
|
export * as modules from './modules';
|
|
16
17
|
export * as objects from './objects';
|
|
17
18
|
export * as usage from './usage';
|
package/esm/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export * as api from './api';
|
|
|
12
12
|
export * as auth from './auth';
|
|
13
13
|
export * as compute from './compute';
|
|
14
14
|
export * as config from './config';
|
|
15
|
+
export * as infra from './infra';
|
|
15
16
|
export * as modules from './modules';
|
|
16
17
|
export * as objects from './objects';
|
|
17
18
|
export * as usage from './usage';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ORM Client - Runtime GraphQL executor
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import type { GraphQLAdapter, GraphQLError, QueryResult } from '@constructive-io/graphql-query/runtime';
|
|
7
|
+
import type { ConnectionState, ConnectionStateListener, RealtimeConfig, SubscriptionEvent, SubscriptionFieldMeta, Unsubscribe } from './realtime';
|
|
8
|
+
export type { GraphQLAdapter, GraphQLError, QueryResult, } from '@constructive-io/graphql-query/runtime';
|
|
9
|
+
export type { ConnectionState, ConnectionStateListener, RealtimeConfig, SubscribeOptions, SubscriptionEvent, SubscriptionFieldMeta, SubscriptionOperation, Unsubscribe, WsClient, } from './realtime';
|
|
10
|
+
export { RealtimeManager } from './realtime';
|
|
11
|
+
/**
|
|
12
|
+
* Default adapter that uses fetch for HTTP requests.
|
|
13
|
+
*
|
|
14
|
+
* When no custom fetch is provided, uses @constructive-io/fetch which
|
|
15
|
+
* handles *.localhost DNS rewriting and Host header preservation in
|
|
16
|
+
* Node.js. Pass a custom fetch to override for test mocking or custom
|
|
17
|
+
* proxy/credentials.
|
|
18
|
+
*/
|
|
19
|
+
export declare class FetchAdapter implements GraphQLAdapter {
|
|
20
|
+
private endpoint;
|
|
21
|
+
private headers;
|
|
22
|
+
private fetchFn;
|
|
23
|
+
constructor(endpoint: string, headers?: Record<string, string>, fetchFn?: typeof globalThis.fetch);
|
|
24
|
+
execute<T>(document: string, variables?: Record<string, unknown>): Promise<QueryResult<T>>;
|
|
25
|
+
setHeaders(headers: Record<string, string>): void;
|
|
26
|
+
getEndpoint(): string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Configuration for creating an ORM client.
|
|
30
|
+
* Either provide endpoint (and optional headers/fetch) for HTTP requests,
|
|
31
|
+
* or provide a custom adapter for alternative execution strategies.
|
|
32
|
+
*/
|
|
33
|
+
export interface OrmClientConfig {
|
|
34
|
+
/** GraphQL endpoint URL (required if adapter not provided) */
|
|
35
|
+
endpoint?: string;
|
|
36
|
+
/** Default headers for HTTP requests (only used with endpoint) */
|
|
37
|
+
headers?: Record<string, string>;
|
|
38
|
+
/**
|
|
39
|
+
* Custom fetch implementation. Defaults to createFetch() from
|
|
40
|
+
* @constructive-io/graphql-query/runtime which handles *.localhost
|
|
41
|
+
* DNS and Host headers in Node.js. Pass your own for test mocking
|
|
42
|
+
* or custom proxy/credentials.
|
|
43
|
+
*/
|
|
44
|
+
fetch?: typeof globalThis.fetch;
|
|
45
|
+
/** Custom adapter for GraphQL execution (overrides endpoint/headers/fetch) */
|
|
46
|
+
adapter?: GraphQLAdapter;
|
|
47
|
+
/**
|
|
48
|
+
* Optional realtime (WebSocket) configuration.
|
|
49
|
+
* When provided, enables subscription methods on models.
|
|
50
|
+
* The WebSocket connection is created lazily on first subscribe().
|
|
51
|
+
*/
|
|
52
|
+
realtime?: RealtimeConfig;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Error thrown when GraphQL request fails
|
|
56
|
+
*/
|
|
57
|
+
export declare class GraphQLRequestError extends Error {
|
|
58
|
+
readonly errors: GraphQLError[];
|
|
59
|
+
readonly data: unknown;
|
|
60
|
+
constructor(errors: GraphQLError[], data?: unknown);
|
|
61
|
+
}
|
|
62
|
+
export declare class OrmClient {
|
|
63
|
+
private adapter;
|
|
64
|
+
private realtimeManager?;
|
|
65
|
+
constructor(config: OrmClientConfig);
|
|
66
|
+
execute<T>(document: string, variables?: Record<string, unknown>): Promise<QueryResult<T>>;
|
|
67
|
+
/**
|
|
68
|
+
* Subscribe to a GraphQL subscription operation.
|
|
69
|
+
* Used by generated model subscribe() methods.
|
|
70
|
+
* @throws Error if realtime is not configured
|
|
71
|
+
*/
|
|
72
|
+
subscribe<T>(meta: SubscriptionFieldMeta, document: string, variables: Record<string, unknown>, options: {
|
|
73
|
+
onEvent: (event: SubscriptionEvent<T>) => void;
|
|
74
|
+
onError?: (error: Error) => void;
|
|
75
|
+
onComplete?: () => void;
|
|
76
|
+
}): Unsubscribe;
|
|
77
|
+
/**
|
|
78
|
+
* Set headers for requests.
|
|
79
|
+
* Only works if the adapter supports headers.
|
|
80
|
+
*/
|
|
81
|
+
setHeaders(headers: Record<string, string>): void;
|
|
82
|
+
/**
|
|
83
|
+
* Get the endpoint URL.
|
|
84
|
+
* Returns empty string if the adapter doesn't have an endpoint.
|
|
85
|
+
*/
|
|
86
|
+
getEndpoint(): string;
|
|
87
|
+
/** Get current WebSocket connection state */
|
|
88
|
+
getConnectionState(): ConnectionState;
|
|
89
|
+
/** Register a listener for WebSocket connection state changes */
|
|
90
|
+
onConnectionStateChange(listener: ConnectionStateListener): Unsubscribe;
|
|
91
|
+
/** Number of active subscriptions */
|
|
92
|
+
getActiveSubscriptionCount(): number;
|
|
93
|
+
/** Whether realtime is configured */
|
|
94
|
+
get isRealtimeEnabled(): boolean;
|
|
95
|
+
/** Dispose the realtime manager (close WebSocket) */
|
|
96
|
+
dispose(): void;
|
|
97
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { createFetch } from '@constructive-io/graphql-query/runtime';
|
|
2
|
+
import { RealtimeManager } from './realtime';
|
|
3
|
+
export { RealtimeManager } from './realtime';
|
|
4
|
+
/**
|
|
5
|
+
* Default adapter that uses fetch for HTTP requests.
|
|
6
|
+
*
|
|
7
|
+
* When no custom fetch is provided, uses @constructive-io/fetch which
|
|
8
|
+
* handles *.localhost DNS rewriting and Host header preservation in
|
|
9
|
+
* Node.js. Pass a custom fetch to override for test mocking or custom
|
|
10
|
+
* proxy/credentials.
|
|
11
|
+
*/
|
|
12
|
+
export class FetchAdapter {
|
|
13
|
+
endpoint;
|
|
14
|
+
headers;
|
|
15
|
+
fetchFn;
|
|
16
|
+
constructor(endpoint, headers, fetchFn) {
|
|
17
|
+
this.endpoint = endpoint;
|
|
18
|
+
this.headers = headers ?? {};
|
|
19
|
+
this.fetchFn = (fetchFn ?? createFetch()).bind(globalThis);
|
|
20
|
+
}
|
|
21
|
+
async execute(document, variables) {
|
|
22
|
+
const response = await this.fetchFn(this.endpoint, {
|
|
23
|
+
method: 'POST',
|
|
24
|
+
headers: {
|
|
25
|
+
'Content-Type': 'application/json',
|
|
26
|
+
Accept: 'application/json',
|
|
27
|
+
...this.headers,
|
|
28
|
+
},
|
|
29
|
+
body: JSON.stringify({
|
|
30
|
+
query: document,
|
|
31
|
+
variables: variables ?? {},
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
if (!response.ok) {
|
|
35
|
+
return {
|
|
36
|
+
ok: false,
|
|
37
|
+
data: null,
|
|
38
|
+
errors: [{ message: `HTTP ${response.status}: ${response.statusText}` }],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const json = (await response.json());
|
|
42
|
+
if (json.errors && json.errors.length > 0) {
|
|
43
|
+
return {
|
|
44
|
+
ok: false,
|
|
45
|
+
data: null,
|
|
46
|
+
errors: json.errors,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
ok: true,
|
|
51
|
+
data: json.data,
|
|
52
|
+
errors: undefined,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
setHeaders(headers) {
|
|
56
|
+
this.headers = { ...this.headers, ...headers };
|
|
57
|
+
}
|
|
58
|
+
getEndpoint() {
|
|
59
|
+
return this.endpoint;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Error thrown when GraphQL request fails
|
|
64
|
+
*/
|
|
65
|
+
export class GraphQLRequestError extends Error {
|
|
66
|
+
errors;
|
|
67
|
+
data;
|
|
68
|
+
constructor(errors, data = null) {
|
|
69
|
+
const messages = errors.map((e) => e.message).join('; ');
|
|
70
|
+
super(`GraphQL Error: ${messages}`);
|
|
71
|
+
this.errors = errors;
|
|
72
|
+
this.data = data;
|
|
73
|
+
this.name = 'GraphQLRequestError';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export class OrmClient {
|
|
77
|
+
adapter;
|
|
78
|
+
realtimeManager;
|
|
79
|
+
constructor(config) {
|
|
80
|
+
if (config.adapter) {
|
|
81
|
+
this.adapter = config.adapter;
|
|
82
|
+
}
|
|
83
|
+
else if (config.endpoint) {
|
|
84
|
+
this.adapter = new FetchAdapter(config.endpoint, config.headers, config.fetch);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
throw new Error('OrmClientConfig requires either an endpoint or a custom adapter');
|
|
88
|
+
}
|
|
89
|
+
if (config.realtime) {
|
|
90
|
+
this.realtimeManager = new RealtimeManager(config.realtime);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async execute(document, variables) {
|
|
94
|
+
return this.adapter.execute(document, variables);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Subscribe to a GraphQL subscription operation.
|
|
98
|
+
* Used by generated model subscribe() methods.
|
|
99
|
+
* @throws Error if realtime is not configured
|
|
100
|
+
*/
|
|
101
|
+
subscribe(meta, document, variables, options) {
|
|
102
|
+
if (!this.realtimeManager) {
|
|
103
|
+
throw new Error('Realtime not configured. Pass a `realtime` option to createClient() to enable subscriptions.');
|
|
104
|
+
}
|
|
105
|
+
return this.realtimeManager.subscribe(meta, document, variables, options);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Set headers for requests.
|
|
109
|
+
* Only works if the adapter supports headers.
|
|
110
|
+
*/
|
|
111
|
+
setHeaders(headers) {
|
|
112
|
+
if (this.adapter.setHeaders) {
|
|
113
|
+
this.adapter.setHeaders(headers);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get the endpoint URL.
|
|
118
|
+
* Returns empty string if the adapter doesn't have an endpoint.
|
|
119
|
+
*/
|
|
120
|
+
getEndpoint() {
|
|
121
|
+
return this.adapter.getEndpoint?.() ?? '';
|
|
122
|
+
}
|
|
123
|
+
/** Get current WebSocket connection state */
|
|
124
|
+
getConnectionState() {
|
|
125
|
+
return this.realtimeManager?.getConnectionState() ?? 'disconnected';
|
|
126
|
+
}
|
|
127
|
+
/** Register a listener for WebSocket connection state changes */
|
|
128
|
+
onConnectionStateChange(listener) {
|
|
129
|
+
if (!this.realtimeManager)
|
|
130
|
+
return () => { };
|
|
131
|
+
return this.realtimeManager.onConnectionStateChange(listener);
|
|
132
|
+
}
|
|
133
|
+
/** Number of active subscriptions */
|
|
134
|
+
getActiveSubscriptionCount() {
|
|
135
|
+
return this.realtimeManager?.getActiveSubscriptionCount() ?? 0;
|
|
136
|
+
}
|
|
137
|
+
/** Whether realtime is configured */
|
|
138
|
+
get isRealtimeEnabled() {
|
|
139
|
+
return this.realtimeManager !== undefined;
|
|
140
|
+
}
|
|
141
|
+
/** Dispose the realtime manager (close WebSocket) */
|
|
142
|
+
dispose() {
|
|
143
|
+
this.realtimeManager?.dispose();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { OrmClientConfig } from './client';
|
|
2
|
+
import { InfraGetAllRecordModel } from './models/infraGetAllRecord';
|
|
3
|
+
import { InfraRefModel } from './models/infraRef';
|
|
4
|
+
import { InfraStoreModel } from './models/infraStore';
|
|
5
|
+
import { InfraObjectModel } from './models/infraObject';
|
|
6
|
+
import { InfraCommitModel } from './models/infraCommit';
|
|
7
|
+
import { DbPresetModel } from './models/dbPreset';
|
|
8
|
+
import { PlatformNamespaceModel } from './models/platformNamespace';
|
|
9
|
+
import { NamespaceModel } from './models/namespace';
|
|
10
|
+
import { PlatformNamespaceEventModel } from './models/platformNamespaceEvent';
|
|
11
|
+
import { NamespaceEventModel } from './models/namespaceEvent';
|
|
12
|
+
export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client';
|
|
13
|
+
export { GraphQLRequestError, FetchAdapter } from './client';
|
|
14
|
+
export { QueryBuilder } from './query-builder';
|
|
15
|
+
export * from './select-types';
|
|
16
|
+
export * from './models';
|
|
17
|
+
export { createMutationOperations } from './mutation';
|
|
18
|
+
/**
|
|
19
|
+
* Create an ORM client instance
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const db = createClient({
|
|
24
|
+
* endpoint: 'https://api.example.com/graphql',
|
|
25
|
+
* headers: { Authorization: 'Bearer token' },
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* // Query users
|
|
29
|
+
* const users = await db.user.findMany({
|
|
30
|
+
* select: { id: true, name: true },
|
|
31
|
+
* first: 10,
|
|
32
|
+
* }).execute();
|
|
33
|
+
*
|
|
34
|
+
* // Create a user
|
|
35
|
+
* const newUser = await db.user.create({
|
|
36
|
+
* data: { name: 'John', email: 'john@example.com' },
|
|
37
|
+
* select: { id: true },
|
|
38
|
+
* }).execute();
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function createClient(config: OrmClientConfig): {
|
|
42
|
+
infraGetAllRecord: InfraGetAllRecordModel;
|
|
43
|
+
infraRef: InfraRefModel;
|
|
44
|
+
infraStore: InfraStoreModel;
|
|
45
|
+
infraObject: InfraObjectModel;
|
|
46
|
+
infraCommit: InfraCommitModel;
|
|
47
|
+
dbPreset: DbPresetModel;
|
|
48
|
+
platformNamespace: PlatformNamespaceModel;
|
|
49
|
+
namespace: NamespaceModel;
|
|
50
|
+
platformNamespaceEvent: PlatformNamespaceEventModel;
|
|
51
|
+
namespaceEvent: NamespaceEventModel;
|
|
52
|
+
mutation: {
|
|
53
|
+
infraInitEmptyRepo: <S extends import("./input-types").InfraInitEmptyRepoPayloadSelect>(args: import("./mutation").InfraInitEmptyRepoVariables, options: {
|
|
54
|
+
select: S;
|
|
55
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").InfraInitEmptyRepoPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
56
|
+
infraInitEmptyRepo: import("./select-types").InferSelectResult<import("./input-types").InfraInitEmptyRepoPayload, S> | null;
|
|
57
|
+
}>;
|
|
58
|
+
infraSetDataAtPath: <S extends import("./input-types").InfraSetDataAtPathPayloadSelect>(args: import("./mutation").InfraSetDataAtPathVariables, options: {
|
|
59
|
+
select: S;
|
|
60
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").InfraSetDataAtPathPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
61
|
+
infraSetDataAtPath: import("./select-types").InferSelectResult<import("./input-types").InfraSetDataAtPathPayload, S> | null;
|
|
62
|
+
}>;
|
|
63
|
+
infraInsertNodeAtPath: <S extends import("./input-types").InfraInsertNodeAtPathPayloadSelect>(args: import("./mutation").InfraInsertNodeAtPathVariables, options: {
|
|
64
|
+
select: S;
|
|
65
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").InfraInsertNodeAtPathPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
66
|
+
infraInsertNodeAtPath: import("./select-types").InferSelectResult<import("./input-types").InfraInsertNodeAtPathPayload, S> | null;
|
|
67
|
+
}>;
|
|
68
|
+
provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
|
|
69
|
+
select: S;
|
|
70
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
71
|
+
provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
|
|
72
|
+
}>;
|
|
73
|
+
};
|
|
74
|
+
};
|