netlify-onegraph-internal
Advanced tools
Comparing version 0.1.18 to 0.2.0
export function verifyRequestSignature(request: any, options: any): any; | ||
export function fetchListNetlifyEnabledServicesQuery(variables: any, options: any): Promise<any>; | ||
export function executeCreateGraphQLSchemaMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateApiTokenMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreatePersistedQueryMutation(variables: any, options: any): Promise<any>; | ||
export function fetchListPersistedQueries(variables: any, options: any): Promise<any>; | ||
export function fetchPersistedQueryQuery(variables: any, options: any): Promise<any>; | ||
export function executeCreateCLISessionMutation(variables: any, options: any): Promise<any>; | ||
export function executeUpdateCLISessionMetadataMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateCLISessionEventMutation(variables: any, options: any): Promise<any>; | ||
export function fetchCLISessionQuery(variables: any, options: any): Promise<any>; | ||
export function executeAckCLISessionEventMutation(variables: any, options: any): Promise<any>; | ||
export function fetchAppSchemaQuery(variables: any, options: any): Promise<any>; | ||
export function fetchCLISessionQuery(variables: any, options: any): Promise<any>; | ||
export function executeCreateApiTokenMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateCLISessionEventMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateCLISessionMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateGraphQLSchemaMutation(variables: any, options: any): Promise<any>; | ||
export function executeUpsertAppForSiteMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateNewSchemaMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreatePersistedQueryMutation(variables: any, options: any): Promise<any>; | ||
export function executeCreateSharedDocumentMutation(variables: any, options: any): Promise<any>; | ||
export function fetchListPersistedQueries(variables: any, options: any): Promise<any>; | ||
export function fetchListSharedDocumentsQuery(variables: any, options: any): Promise<any>; | ||
export function executeMarkCLISessionActiveHeartbeat(variables: any, options: any): Promise<any>; | ||
export function executeMarkCLISessionInactive(variables: any, options: any): Promise<any>; | ||
export function fetchPersistedQueryQuery(variables: any, options: any): Promise<any>; | ||
export function fetchListSharedDocumentsQuery(variables: any, options: any): Promise<any>; | ||
export function executeCreateSharedDocumentMutation(variables: any, options: any): Promise<any>; | ||
export function fetchSharedDocumentQuery(variables: any, options: any): Promise<any>; | ||
export function executeUpdateCLISessionMetadataMutation(variables: any, options: any): Promise<any>; | ||
export function executeUpsertAppForSiteMutation(variables: any, options: any): Promise<any>; | ||
export function fetchListNetlifyEnabledServicesQuery(variables: any, options: any): Promise<any>; | ||
export default functions; | ||
@@ -22,0 +22,0 @@ export function handler(): { |
@@ -50,3 +50,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handler = exports.executeUpsertAppForSiteMutation = exports.executeUpdateCLISessionMetadataMutation = exports.fetchSharedDocumentQuery = exports.fetchPersistedQueryQuery = exports.executeMarkCLISessionInactive = exports.executeMarkCLISessionActiveHeartbeat = exports.fetchListSharedDocumentsQuery = exports.fetchListPersistedQueries = exports.executeCreateSharedDocumentMutation = exports.executeCreatePersistedQueryMutation = exports.executeCreateNewSchemaMutation = exports.executeCreateGraphQLSchemaMutation = exports.executeCreateCLISessionMutation = exports.executeCreateCLISessionEventMutation = exports.executeCreateApiTokenMutation = exports.fetchCLISessionQuery = exports.fetchAppSchemaQuery = exports.executeAckCLISessionEventMutation = exports.fetchListNetlifyEnabledServicesQuery = exports.verifyRequestSignature = void 0; | ||
exports.handler = exports.fetchListNetlifyEnabledServicesQuery = exports.fetchSharedDocumentQuery = exports.executeCreateSharedDocumentMutation = exports.fetchListSharedDocumentsQuery = exports.executeMarkCLISessionInactive = exports.executeMarkCLISessionActiveHeartbeat = exports.executeCreateNewSchemaMutation = exports.executeUpsertAppForSiteMutation = exports.fetchAppSchemaQuery = exports.executeAckCLISessionEventMutation = exports.fetchCLISessionQuery = exports.executeCreateCLISessionEventMutation = exports.executeUpdateCLISessionMetadataMutation = exports.executeCreateCLISessionMutation = exports.fetchPersistedQueryQuery = exports.fetchListPersistedQueries = exports.executeCreatePersistedQueryMutation = exports.executeCreateApiTokenMutation = exports.executeCreateGraphQLSchemaMutation = exports.verifyRequestSignature = void 0; | ||
/* eslint-disable */ | ||
@@ -180,16 +180,16 @@ // @ts-nocheck | ||
exports.verifyRequestSignature = verifyRequestSignature; | ||
var fetchListNetlifyEnabledServicesQuery = function (variables, options) { | ||
var executeCreateGraphQLSchemaMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query ListNetlifyEnabledServicesQuery($logoStyle: OneGraphAppLogoStyleEnum = ROUNDED_RECTANGLE, $betaServices: [OneGraphServiceEnumArg!] = []) {\n oneGraph {\n services(\n filter: {or: [{service: {in: $betaServices}}, {supportsNetlifyGraph: true}, {supportsNetlifyApiAuthentication: true}]}\n ) {\n friendlyServiceName\n logoUrl(style: $logoStyle)\n service\n slug\n supportsCustomRedirectUri\n supportsCustomServiceAuth\n supportsOauthLogin\n netlifyGraphEnabled\n netlifyApiAuthenticationEnabled\n }\n }\n}", | ||
operationName: "ListNetlifyEnabledServicesQuery", | ||
query: "mutation CreateGraphQLSchemaMutation($input: OneGraphCreateGraphQLSchemaInput!) {\n oneGraph {\n createGraphQLSchema(input: $input) {\n graphQLSchema {\n id\n externalGraphQLSchemas {\n nodes {\n id\n endpoint\n service\n createdAt\n updatedAt\n }\n }\n parentGraphQLSchemaId\n salesforceSchema {\n id\n createdAt\n updatedAt\n }\n services {\n slug\n }\n updatedAt\n createdAt\n appId\n }\n }\n }\n}", | ||
operationName: "CreateGraphQLSchemaMutation", | ||
variables: variables, | ||
options: options, | ||
fetchStrategy: "GET", | ||
fetchStrategy: "POST", | ||
}); | ||
}; | ||
exports.fetchListNetlifyEnabledServicesQuery = fetchListNetlifyEnabledServicesQuery; | ||
var executeAckCLISessionEventMutation = function (variables, options) { | ||
exports.executeCreateGraphQLSchemaMutation = executeCreateGraphQLSchemaMutation; | ||
var executeCreateApiTokenMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation AckCLISessionEventMutation($nfToken: String!, $sessionId: String!, $eventIds: [String!]!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n ackNetlifyCliEvents(input: {eventIds: $eventIds, sessionId: $sessionId}) {\n events {\n id\n }\n }\n }\n}", | ||
operationName: "AckCLISessionEventMutation", | ||
query: "mutation CreateApiTokenMutation($input: OneGraphCreateApiTokenTokenInput!, $nfToken: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createApiToken(input: $input) {\n accessToken {\n token\n userAuths {\n service\n foreignUserId\n scopes\n }\n appId\n expireDate\n name\n netlifyId\n anchor\n }\n }\n }\n}", | ||
operationName: "CreateApiTokenMutation", | ||
variables: variables, | ||
@@ -200,7 +200,7 @@ options: options, | ||
}; | ||
exports.executeAckCLISessionEventMutation = executeAckCLISessionEventMutation; | ||
var fetchAppSchemaQuery = function (variables, options) { | ||
exports.executeCreateApiTokenMutation = executeCreateApiTokenMutation; | ||
var executeCreatePersistedQueryMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query AppSchemaQuery($nfToken: String!, $appId: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n app(id: $appId) {\n graphQLSchema {\n appId\n createdAt\n id\n services {\n friendlyServiceName\n logoUrl\n service\n slug\n supportsCustomRedirectUri\n supportsCustomServiceAuth\n supportsOauthLogin\n }\n updatedAt\n }\n }\n }\n}", | ||
operationName: "AppSchemaQuery", | ||
query: "mutation CreatePersistedQueryMutation($nfToken: String!, $cacheStrategy: OneGraphPersistedQueryCacheStrategyArg, $allowedOperationNames: [String!]!, $fallbackOnError: Boolean!, $freeVariables: [String!]!, $query: String!, $tags: [String!]!, $description: String, $appId: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createPersistedQuery(\n input: {query: $query, appId: $appId, cacheStrategy: $cacheStrategy, allowedOperationNames: $allowedOperationNames, fallbackOnError: $fallbackOnError, freeVariables: $freeVariables, tags: $tags, description: $description}\n ) {\n persistedQuery {\n id\n allowedOperationNames\n description\n fixedVariables\n freeVariables\n query\n tags\n }\n }\n }\n}", | ||
operationName: "CreatePersistedQueryMutation", | ||
variables: variables, | ||
@@ -211,7 +211,7 @@ options: options, | ||
}; | ||
exports.fetchAppSchemaQuery = fetchAppSchemaQuery; | ||
var fetchCLISessionQuery = function (variables, options) { | ||
exports.executeCreatePersistedQueryMutation = executeCreatePersistedQueryMutation; | ||
var fetchListPersistedQueries = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query CLISessionQuery($nfToken: String!, $sessionId: String!, $first: Int!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n __typename\n netlifyCliSession(id: $sessionId) {\n appId\n createdAt\n id\n cliHeartbeatIntervalMs\n events(first: $first) {\n __typename\n createdAt\n id\n sessionId\n ... on OneGraphNetlifyCliSessionLogEvent {\n id\n message\n sessionId\n createdAt\n }\n ... on OneGraphNetlifyCliSessionTestEvent {\n id\n createdAt\n payload\n sessionId\n }\n }\n lastEventAt\n metadata\n name\n netlifyUserId\n }\n }\n}", | ||
operationName: "CLISessionQuery", | ||
query: "query ListPersistedQueries($appId: String!, $first: Int!, $after: String, $tags: [String!]!) {\n oneGraph {\n app(id: $appId) {\n id\n persistedQueries(first: $first, after: $after, tags: $tags) {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n id\n query\n fixedVariables\n freeVariables\n allowedOperationNames\n tags\n description\n }\n }\n }\n }\n}", | ||
operationName: "ListPersistedQueries", | ||
variables: variables, | ||
@@ -222,7 +222,7 @@ options: options, | ||
}; | ||
exports.fetchCLISessionQuery = fetchCLISessionQuery; | ||
var executeCreateApiTokenMutation = function (variables, options) { | ||
exports.fetchListPersistedQueries = fetchListPersistedQueries; | ||
var fetchPersistedQueryQuery = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreateApiTokenMutation($input: OneGraphCreateApiTokenTokenInput!, $nfToken: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createApiToken(input: $input) {\n accessToken {\n token\n userAuths {\n service\n foreignUserId\n scopes\n }\n appId\n expireDate\n name\n netlifyId\n anchor\n }\n }\n }\n}", | ||
operationName: "CreateApiTokenMutation", | ||
query: "query PersistedQueryQuery($nfToken: String!, $appId: String!, $id: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n persistedQuery(appId: $appId, id: $id) {\n id\n query\n allowedOperationNames\n description\n freeVariables\n fixedVariables\n tags\n }\n }\n}", | ||
operationName: "PersistedQueryQuery", | ||
variables: variables, | ||
@@ -233,7 +233,7 @@ options: options, | ||
}; | ||
exports.executeCreateApiTokenMutation = executeCreateApiTokenMutation; | ||
var executeCreateCLISessionEventMutation = function (variables, options) { | ||
exports.fetchPersistedQueryQuery = fetchPersistedQueryQuery; | ||
var executeCreateCLISessionMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreateCLISessionEventMutation($nfToken: String!, $sessionId: String!, $payload: JSON!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createNetlifyCliTestEvent(\n input: {data: {payload: $payload}, sessionId: $sessionId}\n ) {\n event {\n id\n createdAt\n sessionId\n }\n }\n }\n}", | ||
operationName: "CreateCLISessionEventMutation", | ||
query: "mutation CreateCLISessionMutation($nfToken: String!, $appId: String!, $name: String!, $metadata: JSON) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createNetlifyCliSession(\n input: {appId: $appId, name: $name, metadata: $metadata}\n ) {\n session {\n id\n appId\n netlifyUserId\n name\n cliHeartbeatIntervalMs\n }\n }\n }\n}", | ||
operationName: "CreateCLISessionMutation", | ||
variables: variables, | ||
@@ -244,7 +244,7 @@ options: options, | ||
}; | ||
exports.executeCreateCLISessionEventMutation = executeCreateCLISessionEventMutation; | ||
var executeCreateCLISessionMutation = function (variables, options) { | ||
exports.executeCreateCLISessionMutation = executeCreateCLISessionMutation; | ||
var executeUpdateCLISessionMetadataMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreateCLISessionMutation($nfToken: String!, $appId: String!, $name: String!, $metadata: JSON) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createNetlifyCliSession(\n input: {appId: $appId, name: $name, metadata: $metadata}\n ) {\n session {\n id\n appId\n netlifyUserId\n name\n cliHeartbeatIntervalMs\n }\n }\n }\n}", | ||
operationName: "CreateCLISessionMutation", | ||
query: "mutation UpdateCLISessionMetadataMutation($nfToken: String!, $sessionId: String!, $metadata: JSON!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n updateNetlifyCliSession(input: {id: $sessionId, metadata: $metadata}) {\n session {\n id\n name\n metadata\n cliHeartbeatIntervalMs\n }\n }\n }\n}", | ||
operationName: "UpdateCLISessionMetadataMutation", | ||
variables: variables, | ||
@@ -255,7 +255,7 @@ options: options, | ||
}; | ||
exports.executeCreateCLISessionMutation = executeCreateCLISessionMutation; | ||
var executeCreateGraphQLSchemaMutation = function (variables, options) { | ||
exports.executeUpdateCLISessionMetadataMutation = executeUpdateCLISessionMetadataMutation; | ||
var executeCreateCLISessionEventMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreateGraphQLSchemaMutation($input: OneGraphCreateGraphQLSchemaInput!) {\n oneGraph {\n createGraphQLSchema(input: $input) {\n graphQLSchema {\n id\n externalGraphQLSchemas {\n nodes {\n id\n endpoint\n service\n createdAt\n updatedAt\n }\n }\n parentGraphQLSchemaId\n salesforceSchema {\n id\n createdAt\n updatedAt\n }\n services {\n slug\n }\n updatedAt\n createdAt\n appId\n }\n }\n }\n}", | ||
operationName: "CreateGraphQLSchemaMutation", | ||
query: "mutation CreateCLISessionEventMutation($nfToken: String!, $sessionId: String!, $payload: JSON!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createNetlifyCliTestEvent(\n input: {data: {payload: $payload}, sessionId: $sessionId}\n ) {\n event {\n id\n createdAt\n sessionId\n }\n }\n }\n}", | ||
operationName: "CreateCLISessionEventMutation", | ||
variables: variables, | ||
@@ -266,7 +266,7 @@ options: options, | ||
}; | ||
exports.executeCreateGraphQLSchemaMutation = executeCreateGraphQLSchemaMutation; | ||
var executeCreateNewSchemaMutation = function (variables, options) { | ||
exports.executeCreateCLISessionEventMutation = executeCreateCLISessionEventMutation; | ||
var fetchCLISessionQuery = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreateNewSchemaMutation($nfToken: String!, $input: OneGraphCreateGraphQLSchemaInput!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createGraphQLSchema(input: $input) {\n app {\n graphQLSchema {\n id\n }\n }\n graphqlSchema {\n id\n services {\n friendlyServiceName\n logoUrl\n service\n slug\n supportsCustomRedirectUri\n supportsCustomServiceAuth\n supportsOauthLogin\n }\n }\n }\n }\n}", | ||
operationName: "CreateNewSchemaMutation", | ||
query: "query CLISessionQuery($nfToken: String!, $sessionId: String!, $first: Int!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n __typename\n netlifyCliSession(id: $sessionId) {\n appId\n createdAt\n id\n cliHeartbeatIntervalMs\n events(first: $first) {\n __typename\n createdAt\n id\n sessionId\n ... on OneGraphNetlifyCliSessionLogEvent {\n id\n message\n sessionId\n createdAt\n }\n ... on OneGraphNetlifyCliSessionTestEvent {\n id\n createdAt\n payload\n sessionId\n }\n }\n lastEventAt\n metadata\n name\n netlifyUserId\n }\n }\n}", | ||
operationName: "CLISessionQuery", | ||
variables: variables, | ||
@@ -277,7 +277,7 @@ options: options, | ||
}; | ||
exports.executeCreateNewSchemaMutation = executeCreateNewSchemaMutation; | ||
var executeCreatePersistedQueryMutation = function (variables, options) { | ||
exports.fetchCLISessionQuery = fetchCLISessionQuery; | ||
var executeAckCLISessionEventMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreatePersistedQueryMutation($nfToken: String!, $cacheStrategy: OneGraphPersistedQueryCacheStrategyArg, $allowedOperationNames: [String!]!, $fallbackOnError: Boolean!, $freeVariables: [String!]!, $query: String!, $tags: [String!]!, $description: String, $appId: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createPersistedQuery(\n input: {query: $query, appId: $appId, cacheStrategy: $cacheStrategy, allowedOperationNames: $allowedOperationNames, fallbackOnError: $fallbackOnError, freeVariables: $freeVariables, tags: $tags, description: $description}\n ) {\n persistedQuery {\n id\n allowedOperationNames\n description\n fixedVariables\n freeVariables\n query\n tags\n }\n }\n }\n}", | ||
operationName: "CreatePersistedQueryMutation", | ||
query: "mutation AckCLISessionEventMutation($nfToken: String!, $sessionId: String!, $eventIds: [String!]!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n ackNetlifyCliEvents(input: {eventIds: $eventIds, sessionId: $sessionId}) {\n events {\n id\n }\n }\n }\n}", | ||
operationName: "AckCLISessionEventMutation", | ||
variables: variables, | ||
@@ -288,7 +288,7 @@ options: options, | ||
}; | ||
exports.executeCreatePersistedQueryMutation = executeCreatePersistedQueryMutation; | ||
var executeCreateSharedDocumentMutation = function (variables, options) { | ||
exports.executeAckCLISessionEventMutation = executeAckCLISessionEventMutation; | ||
var fetchAppSchemaQuery = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation CreateSharedDocumentMutation($nfToken: String!, $input: OneGraphCreateSharedDocumentInput!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createSharedDocument(input: $input) {\n sharedDocument {\n id\n moderationStatus\n operationName\n services {\n friendlyServiceName\n }\n description\n }\n }\n }\n}", | ||
operationName: "CreateSharedDocumentMutation", | ||
query: "query AppSchemaQuery($nfToken: String!, $appId: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n app(id: $appId) {\n graphQLSchema {\n appId\n createdAt\n id\n services {\n friendlyServiceName\n logoUrl\n service\n slug\n supportsCustomRedirectUri\n supportsCustomServiceAuth\n supportsOauthLogin\n }\n updatedAt\n }\n }\n }\n}", | ||
operationName: "AppSchemaQuery", | ||
variables: variables, | ||
@@ -299,7 +299,7 @@ options: options, | ||
}; | ||
exports.executeCreateSharedDocumentMutation = executeCreateSharedDocumentMutation; | ||
var fetchListPersistedQueries = function (variables, options) { | ||
exports.fetchAppSchemaQuery = fetchAppSchemaQuery; | ||
var executeUpsertAppForSiteMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query ListPersistedQueries($appId: String!, $first: Int!, $after: String, $tags: [String!]!) {\n oneGraph {\n app(id: $appId) {\n id\n persistedQueries(first: $first, after: $after, tags: $tags) {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n id\n query\n fixedVariables\n freeVariables\n allowedOperationNames\n tags\n description\n }\n }\n }\n }\n}", | ||
operationName: "ListPersistedQueries", | ||
query: "mutation UpsertAppForSiteMutation($nfToken: String!, $siteId: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n upsertAppForNetlifySite(input: {netlifySiteId: $siteId}) {\n org {\n id\n name\n }\n app {\n id\n name\n corsOrigins\n customCorsOrigins {\n friendlyServiceName\n displayName\n encodedValue\n }\n }\n }\n }\n}", | ||
operationName: "UpsertAppForSiteMutation", | ||
variables: variables, | ||
@@ -310,7 +310,7 @@ options: options, | ||
}; | ||
exports.fetchListPersistedQueries = fetchListPersistedQueries; | ||
var fetchListSharedDocumentsQuery = function (variables, options) { | ||
exports.executeUpsertAppForSiteMutation = executeUpsertAppForSiteMutation; | ||
var executeCreateNewSchemaMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query ListSharedDocumentsQuery($nfToken: String!, $first: Int = 10, $status: OneGraphSharedDocumentModerationStatusEnum, $services: [OneGraphServiceEnumArg!]!, $style: OneGraphAppLogoStyleEnum = ROUNDED_RECTANGLE) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n sharedDocuments(\n first: $first\n filter: {moderationStatus: {equalTo: $status}, services: {in: $services}}\n ) {\n nodes {\n description\n body\n createdAt\n id\n moderationStatus\n operationName\n siteId\n updatedAt\n services {\n friendlyServiceName\n logoUrl(style: $style)\n service\n slug\n }\n }\n }\n }\n}", | ||
operationName: "ListSharedDocumentsQuery", | ||
query: "mutation CreateNewSchemaMutation($nfToken: String!, $input: OneGraphCreateGraphQLSchemaInput!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createGraphQLSchema(input: $input) {\n app {\n graphQLSchema {\n id\n }\n }\n graphqlSchema {\n id\n services {\n friendlyServiceName\n logoUrl\n service\n slug\n supportsCustomRedirectUri\n supportsCustomServiceAuth\n supportsOauthLogin\n }\n }\n }\n }\n}", | ||
operationName: "CreateNewSchemaMutation", | ||
variables: variables, | ||
@@ -321,3 +321,3 @@ options: options, | ||
}; | ||
exports.fetchListSharedDocumentsQuery = fetchListSharedDocumentsQuery; | ||
exports.executeCreateNewSchemaMutation = executeCreateNewSchemaMutation; | ||
var executeMarkCLISessionActiveHeartbeat = function (variables, options) { | ||
@@ -343,6 +343,6 @@ return fetchNetlifyGraph({ | ||
exports.executeMarkCLISessionInactive = executeMarkCLISessionInactive; | ||
var fetchPersistedQueryQuery = function (variables, options) { | ||
var fetchListSharedDocumentsQuery = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query PersistedQueryQuery($nfToken: String!, $appId: String!, $id: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n persistedQuery(appId: $appId, id: $id) {\n id\n query\n allowedOperationNames\n description\n freeVariables\n fixedVariables\n tags\n }\n }\n}", | ||
operationName: "PersistedQueryQuery", | ||
query: "query ListSharedDocumentsQuery($nfToken: String!, $first: Int = 10, $status: OneGraphSharedDocumentModerationStatusEnum, $services: [OneGraphServiceEnumArg!]!, $style: OneGraphAppLogoStyleEnum = ROUNDED_RECTANGLE) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n sharedDocuments(\n first: $first\n filter: {moderationStatus: {equalTo: $status}, services: {in: $services}}\n ) {\n nodes {\n description\n body\n createdAt\n id\n moderationStatus\n operationName\n siteId\n updatedAt\n services {\n friendlyServiceName\n logoUrl(style: $style)\n service\n slug\n }\n }\n }\n }\n}", | ||
operationName: "ListSharedDocumentsQuery", | ||
variables: variables, | ||
@@ -353,7 +353,7 @@ options: options, | ||
}; | ||
exports.fetchPersistedQueryQuery = fetchPersistedQueryQuery; | ||
var fetchSharedDocumentQuery = function (variables, options) { | ||
exports.fetchListSharedDocumentsQuery = fetchListSharedDocumentsQuery; | ||
var executeCreateSharedDocumentMutation = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "query SharedDocumentQuery($nfToken: String!, $id: String!, $logoStyle: OneGraphAppLogoStyleEnum = ROUNDED_RECTANGLE) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n sharedDocument(id: $id) {\n body\n createdAt\n description\n id\n moderationStatus\n operationName\n updatedAt\n services {\n logoUrl(style: $logoStyle)\n friendlyServiceName\n service\n slug\n }\n }\n }\n}", | ||
operationName: "SharedDocumentQuery", | ||
query: "mutation CreateSharedDocumentMutation($nfToken: String!, $input: OneGraphCreateSharedDocumentInput!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n createSharedDocument(input: $input) {\n sharedDocument {\n id\n moderationStatus\n operationName\n services {\n friendlyServiceName\n }\n description\n }\n }\n }\n}", | ||
operationName: "CreateSharedDocumentMutation", | ||
variables: variables, | ||
@@ -364,7 +364,7 @@ options: options, | ||
}; | ||
exports.fetchSharedDocumentQuery = fetchSharedDocumentQuery; | ||
var executeUpdateCLISessionMetadataMutation = function (variables, options) { | ||
exports.executeCreateSharedDocumentMutation = executeCreateSharedDocumentMutation; | ||
var fetchSharedDocumentQuery = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation UpdateCLISessionMetadataMutation($nfToken: String!, $sessionId: String!, $metadata: JSON!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n updateNetlifyCliSession(input: {id: $sessionId, metadata: $metadata}) {\n session {\n id\n name\n metadata\n cliHeartbeatIntervalMs\n }\n }\n }\n}", | ||
operationName: "UpdateCLISessionMetadataMutation", | ||
query: "query SharedDocumentQuery($nfToken: String!, $id: String!, $logoStyle: OneGraphAppLogoStyleEnum = ROUNDED_RECTANGLE) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n sharedDocument(id: $id) {\n body\n createdAt\n description\n id\n moderationStatus\n operationName\n updatedAt\n services {\n logoUrl(style: $logoStyle)\n friendlyServiceName\n service\n slug\n }\n }\n }\n}", | ||
operationName: "SharedDocumentQuery", | ||
variables: variables, | ||
@@ -375,13 +375,13 @@ options: options, | ||
}; | ||
exports.executeUpdateCLISessionMetadataMutation = executeUpdateCLISessionMetadataMutation; | ||
var executeUpsertAppForSiteMutation = function (variables, options) { | ||
exports.fetchSharedDocumentQuery = fetchSharedDocumentQuery; | ||
var fetchListNetlifyEnabledServicesQuery = function (variables, options) { | ||
return fetchNetlifyGraph({ | ||
query: "mutation UpsertAppForSiteMutation($nfToken: String!, $siteId: String!) {\n oneGraph(auths: {netlifyAuth: {oauthToken: $nfToken}}) {\n upsertAppForNetlifySite(input: {netlifySiteId: $siteId}) {\n org {\n id\n name\n }\n app {\n id\n name\n corsOrigins\n customCorsOrigins {\n friendlyServiceName\n displayName\n encodedValue\n }\n }\n }\n }\n}", | ||
operationName: "UpsertAppForSiteMutation", | ||
query: "query ListNetlifyEnabledServicesQuery($logoStyle: OneGraphAppLogoStyleEnum = ROUNDED_RECTANGLE, $betaServices: [OneGraphServiceEnumArg!] = []) {\n oneGraph {\n services(\n filter: {or: [{service: {in: $betaServices}}, {supportsNetlifyGraph: true}, {supportsNetlifyApiAuthentication: true}]}\n ) {\n friendlyServiceName\n logoUrl(style: $logoStyle)\n service\n slug\n supportsCustomRedirectUri\n supportsCustomServiceAuth\n supportsOauthLogin\n netlifyGraphEnabled\n netlifyApiAuthenticationEnabled\n }\n }\n}", | ||
operationName: "ListNetlifyEnabledServicesQuery", | ||
variables: variables, | ||
options: options, | ||
fetchStrategy: "POST", | ||
fetchStrategy: "GET", | ||
}); | ||
}; | ||
exports.executeUpsertAppForSiteMutation = executeUpsertAppForSiteMutation; | ||
exports.fetchListNetlifyEnabledServicesQuery = fetchListNetlifyEnabledServicesQuery; | ||
/** | ||
@@ -388,0 +388,0 @@ * The generated NetlifyGraph library with your operations |
@@ -17,6 +17,7 @@ import { DocumentNode, FragmentDefinitionNode, GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from "graphql"; | ||
netlifyGraphTypeDefinitionsFilename: string[]; | ||
graphQLOperationsSourceFilename: string[]; | ||
graphQLOperationsSourceDirectory: string[]; | ||
graphQLSchemaFilename: string[]; | ||
netlifyGraphRequirePath: string[]; | ||
netlifyGraphPath: string[]; | ||
graphQLOperationsSourceFilename?: string[]; | ||
graphQLConfigJsonFilename: string[]; | ||
@@ -70,2 +71,3 @@ framework: string; | ||
}; | ||
export declare const defaultSourceOperationsDirectoryName: string[]; | ||
export declare const defaultSourceOperationsFilename = "netlifyGraphOperationsLibrary.graphql"; | ||
@@ -72,0 +74,0 @@ export declare const defaultGraphQLSchemaFilename = "netlifyGraphSchema.graphql"; |
@@ -50,3 +50,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateCustomHandlerSource = exports.generateHandlerSource = exports.extractFunctionsFromOperationDoc = exports.pluckNetlifyCacheControlDirective = exports.pluckNetlifyDirective = exports.generatePersistedFunctionsSource = exports.generateFunctionsSource = exports.generateTypeScriptDefinitions = exports.generateFragmentTypeScriptDefinition = exports.generateProductionJavaScriptClient = exports.generateJavaScriptClient = exports.fragmentToParsedFragmentDefinition = exports.queryToFunctionDefinition = exports.generateSubscriptionFunction = exports.generateSubscriptionFunctionTypeDefinition = exports.defaultExampleOperationsDoc = exports.defaultNetlifyGraphConfig = exports.defaultGraphQLSchemaFilename = exports.defaultSourceOperationsFilename = exports.NETLIFY_CACHE_CONTROL_DIRECTIVE_NAME = exports.NETLIFY_DIRECTIVE_NAME = void 0; | ||
exports.generateCustomHandlerSource = exports.generateHandlerSource = exports.extractFunctionsFromOperationDoc = exports.pluckNetlifyCacheControlDirective = exports.pluckNetlifyDirective = exports.generatePersistedFunctionsSource = exports.generateFunctionsSource = exports.generateTypeScriptDefinitions = exports.generateFragmentTypeScriptDefinition = exports.generateProductionJavaScriptClient = exports.generateJavaScriptClient = exports.fragmentToParsedFragmentDefinition = exports.queryToFunctionDefinition = exports.generateSubscriptionFunction = exports.generateSubscriptionFunctionTypeDefinition = exports.defaultExampleOperationsDoc = exports.defaultNetlifyGraphConfig = exports.defaultGraphQLSchemaFilename = exports.defaultSourceOperationsFilename = exports.defaultSourceOperationsDirectoryName = exports.NETLIFY_CACHE_CONTROL_DIRECTIVE_NAME = exports.NETLIFY_DIRECTIVE_NAME = void 0; | ||
var uuid_1 = require("uuid"); | ||
@@ -69,2 +69,3 @@ var graphql_1 = require("graphql"); | ||
exports.NETLIFY_CACHE_CONTROL_DIRECTIVE_NAME = "netlifyCacheControl"; | ||
exports.defaultSourceOperationsDirectoryName = ["operations"]; | ||
exports.defaultSourceOperationsFilename = "netlifyGraphOperationsLibrary.graphql"; | ||
@@ -90,7 +91,7 @@ exports.defaultGraphQLSchemaFilename = "netlifyGraphSchema.graphql"; | ||
], | ||
graphQLOperationsSourceFilename: [ | ||
graphQLOperationsSourceDirectory: [ | ||
"netlify", | ||
"functions", | ||
"netlifyGraph", | ||
exports.defaultSourceOperationsFilename, | ||
"operations", | ||
], | ||
@@ -277,3 +278,7 @@ graphQLSchemaFilename: [ | ||
var safeOperationsDoc = replaceAll(operationsWithoutTemplateDollar, "`", "\\`"); | ||
var functionDecls = enabledFunctions.map(function (fn) { | ||
var functionDecls = enabledFunctions | ||
.sort(function (a, b) { | ||
return a.id.localeCompare(b.id); | ||
}) | ||
.map(function (fn) { | ||
var _a, _b; | ||
@@ -328,3 +333,7 @@ if (fn.kind === "subscription") { | ||
var generateProductionJavaScriptClient = function (netlifyGraphConfig, schema, operationsDoc, enabledFunctions, schemaId) { | ||
var functionDecls = enabledFunctions.map(function (fn) { | ||
var functionDecls = enabledFunctions | ||
.sort(function (a, b) { | ||
return a.id.localeCompare(b.id); | ||
}) | ||
.map(function (fn) { | ||
var _a, _b; | ||
@@ -391,6 +400,14 @@ if (fn.kind === "subscription") { | ||
var generateTypeScriptDefinitions = function (netlifyGraphConfig, schema, enabledFunctions, enabledFragments) { | ||
var fragmentDecls = Object.values(enabledFragments).map(function (fragment) { | ||
var fragmentDecls = Object.values(enabledFragments) | ||
.sort(function (a, b) { | ||
return a.id.localeCompare(b.id); | ||
}) | ||
.map(function (fragment) { | ||
return (0, exports.generateFragmentTypeScriptDefinition)(netlifyGraphConfig, schema, fragment); | ||
}); | ||
var functionDecls = enabledFunctions.map(function (fn) { | ||
var functionDecls = enabledFunctions | ||
.sort(function (a, b) { | ||
return a.id.localeCompare(b.id); | ||
}) | ||
.map(function (fn) { | ||
var isSubscription = fn.kind === "subscription"; | ||
@@ -413,3 +430,5 @@ if (isSubscription) { | ||
: ""; | ||
return inputSignatureExport + "\nexport type " + returnSignatureName + " = " + fn.returnSignature + ";\n\n/**\n * " + jsDoc + "\n */\nexport function " + fn.fnName + "(\n " + emptyVariablesGuideDocString + "variables: " + (shouldExportInputSignature ? inputSignatureName : "Record<string, never>") + ",\n options?: NetlifyGraphFunctionOptions\n): Promise<" + returnSignatureName + ">;"; | ||
return inputSignatureExport + "\nexport type " + returnSignatureName + " = " + fn.returnSignature + ";\n\n/**\n * " + jsDoc + "\n */\nexport function " + fn.fnName + "(\n " + emptyVariablesGuideDocString + "variables: " + (shouldExportInputSignature | ||
? inputSignatureName | ||
: "Record<string, never>") + ",\n options?: NetlifyGraphFunctionOptions\n): Promise<" + returnSignatureName + ">;"; | ||
}); | ||
@@ -442,3 +461,3 @@ var exportedFunctionsObjectProperties = enabledFunctions | ||
.join(",\n "); | ||
var source = "/* eslint-disable */\n// @ts-nocheck\n// GENERATED VIA NETLIFY AUTOMATED DEV TOOLS, EDIT WITH CAUTION!\n\nexport type NetlifyGraphFunctionOptions = {\n /**\n * The accessToken to use for the request\n */\n accessToken?: string;\n /**\n * The siteId to use for the request\n * @default process.env.SITE_ID\n */\n siteId?: string;\n}\n\nexport type WebhookEvent = {\n body: string;\n headers: Record<string, string | null | undefined>;\n};\n\nexport type GraphQLError = {\n \"path\": Array<string | number>,\n \"message\": string,\n \"extensions\": Record<string, unknown>\n};\n\n" + fragmentDecls.join("\n\n") + "\n\n" + functionDecls.join("\n\n") + "\n\nexport interface Functions {\n " + (exportedFunctionsObjectProperties === "" | ||
var source = "/* eslint-disable */\n// @ts-nocheck\n// GENERATED VIA NETLIFY AUTOMATED DEV TOOLS, EDIT WITH CAUTION!\n\nexport type NetlifyGraphFunctionOptions = {\n /**\n * The accessToken to use for the request\n */\n accessToken?: string;\n /**\n * The siteId to use for the request\n * @default process.env.SITE_ID\n */\n siteId?: string;\n}\n\nexport type WebhookEvent = {\n body: string;\n headers: Record<string, string | null | undefined>;\n};\n\nexport type GraphQLError = {\n \"path\": Array<string | number>;\n \"message\": string;\n \"extensions\": Record<string, unknown>;\n};\n\n" + fragmentDecls.join("\n\n") + "\n\n" + functionDecls.join("\n\n") + "\n\nexport interface Functions {\n " + (exportedFunctionsObjectProperties === "" | ||
? "Record<string, never>" | ||
@@ -468,3 +487,6 @@ : exportedFunctionsObjectProperties) + "\n}\n\nexport const functions: Functions;\n\nexport default functions;\n"; | ||
}) | ||
.filter(Boolean); | ||
.filter(Boolean) | ||
.sort(function (a, b) { | ||
return a.id.localeCompare(b.id); | ||
}); | ||
clientSource = (0, exports.generateJavaScriptClient)(netlifyGraphConfig, schema, operationsDoc, functionDefinitions); | ||
@@ -471,0 +493,0 @@ typeDefinitionsSource = (0, exports.generateTypeScriptDefinitions)(netlifyGraphConfig, schema, functionDefinitions, fragmentDefinitions); |
@@ -18,9 +18,10 @@ "use strict"; | ||
functionsPath: ["pages", "api"], | ||
graphQLOperationsSourceFilename: [ | ||
graphQLOperationsSourceDirectory: ["..", "..", "lib", "netlifyGraph"], | ||
graphQLSchemaFilename: [ | ||
"..", | ||
"..", | ||
"lib", | ||
"netlifyGraphOperationsLibrary.graphql", | ||
"netlifyGraph", | ||
"netlifyGraphSchema.graphql", | ||
], | ||
graphQLSchemaFilename: ["..", "..", "lib", "netlifyGraphSchema.graphql"], | ||
netlifyGraphImplementationFilename: ["..", "..", "lib", "index.js"], | ||
@@ -27,0 +28,0 @@ netlifyGraphTypeDefinitionsFilename: ["..", "..", "lib", "index.d.ts"], |
@@ -53,3 +53,3 @@ "use strict"; | ||
], | ||
graphQLOperationsSourceFilename: [ | ||
graphQLOperationsSourceDirectory: [ | ||
"/", | ||
@@ -63,3 +63,2 @@ "Users", | ||
"netlifyGraph", | ||
"netlifyGraphOperationsLibrary.graphql", | ||
], | ||
@@ -66,0 +65,0 @@ graphQLSchemaFilename: [ |
@@ -60,7 +60,3 @@ "use strict"; | ||
functionsPath: ["pages", "api"], | ||
graphQLOperationsSourceFilename: [ | ||
"functions", | ||
"netlifyGraph", | ||
"netlifyGraphOperationsLibrary.graphql", | ||
], | ||
graphQLOperationsSourceDirectory: ["functions", "netlifyGraph"], | ||
graphQLSchemaFilename: [ | ||
@@ -67,0 +63,0 @@ "functions", |
@@ -21,9 +21,10 @@ "use strict"; | ||
functionsPath: [], | ||
graphQLOperationsSourceFilename: [ | ||
graphQLOperationsSourceDirectory: ["..", "..", "lib", "netlifyGraph"], | ||
graphQLSchemaFilename: [ | ||
"..", | ||
"..", | ||
"lib", | ||
"netlifyGraphOperationsLibrary.graphql", | ||
"netlifyGraph", | ||
"netlifyGraphSchema.graphql", | ||
], | ||
graphQLSchemaFilename: ["..", "..", "lib", "netlifyGraphSchema.graphql"], | ||
netlifyGraphImplementationFilename: ["..", "..", "lib", "index.js"], | ||
@@ -30,0 +31,0 @@ netlifyGraphTypeDefinitionsFilename: ["..", "..", "lib", "index.d.ts"], |
{ | ||
"name": "netlify-onegraph-internal", | ||
"version": "0.1.18", | ||
"version": "0.2.0", | ||
"description": "Internal tools for use by Netlify", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
469599
56
6057
16