-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4884 from Shopify/dev-dash-webhooks-api
Introduce dev dash webhooks API
- Loading branch information
Showing
31 changed files
with
627 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/app/src/cli/api/graphql/webhooks/generated/available-topics.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* eslint-disable @typescript-eslint/consistent-type-definitions */ | ||
import * as Types from './types.js' | ||
|
||
import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' | ||
|
||
export type AvailableTopicsQueryVariables = Types.Exact<{ | ||
apiVersion: Types.Scalars['String']['input'] | ||
}> | ||
|
||
export type AvailableTopicsQuery = {availableTopics?: string[] | null} | ||
|
||
export const AvailableTopics = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
name: {kind: 'Name', value: 'availableTopics'}, | ||
variableDefinitions: [ | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'apiVersion'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'availableTopics'}, | ||
arguments: [ | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'apiVersion'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'apiVersion'}}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode<AvailableTopicsQuery, AvailableTopicsQueryVariables> |
111 changes: 111 additions & 0 deletions
111
packages/app/src/cli/api/graphql/webhooks/generated/cli-testing.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* eslint-disable @typescript-eslint/consistent-type-definitions */ | ||
import * as Types from './types.js' | ||
|
||
import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' | ||
|
||
export type CliTestingMutationVariables = Types.Exact<{ | ||
address: Types.Scalars['String']['input'] | ||
apiKey?: Types.InputMaybe<Types.Scalars['String']['input']> | ||
apiVersion: Types.Scalars['String']['input'] | ||
deliveryMethod: Types.Scalars['String']['input'] | ||
sharedSecret: Types.Scalars['String']['input'] | ||
topic: Types.Scalars['String']['input'] | ||
}> | ||
|
||
export type CliTestingMutation = { | ||
cliTesting?: {headers?: string | null; samplePayload?: string | null; success: boolean; errors: string[]} | null | ||
} | ||
|
||
export const CliTesting = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'mutation', | ||
name: {kind: 'Name', value: 'CliTesting'}, | ||
variableDefinitions: [ | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'address'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'apiKey'}}, | ||
type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}, | ||
}, | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'apiVersion'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'deliveryMethod'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'sharedSecret'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: {kind: 'Variable', name: {kind: 'Name', value: 'topic'}}, | ||
type: {kind: 'NonNullType', type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}}}, | ||
}, | ||
], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'cliTesting'}, | ||
arguments: [ | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'address'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'address'}}, | ||
}, | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'apiKey'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'apiKey'}}, | ||
}, | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'apiVersion'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'apiVersion'}}, | ||
}, | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'deliveryMethod'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'deliveryMethod'}}, | ||
}, | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'sharedSecret'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'sharedSecret'}}, | ||
}, | ||
{ | ||
kind: 'Argument', | ||
name: {kind: 'Name', value: 'topic'}, | ||
value: {kind: 'Variable', name: {kind: 'Name', value: 'topic'}}, | ||
}, | ||
], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'headers'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'samplePayload'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'success'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: 'errors'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: '__typename'}}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode<CliTestingMutation, CliTestingMutationVariables> |
35 changes: 35 additions & 0 deletions
35
packages/app/src/cli/api/graphql/webhooks/generated/public-api-versions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* eslint-disable @typescript-eslint/consistent-type-definitions */ | ||
import * as Types from './types.js' | ||
|
||
import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/core' | ||
|
||
export type PublicApiVersionsQueryVariables = Types.Exact<{[key: string]: never}> | ||
|
||
export type PublicApiVersionsQuery = {publicApiVersions: {handle: string}[]} | ||
|
||
export const PublicApiVersions = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
name: {kind: 'Name', value: 'publicApiVersions'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: {kind: 'Name', value: 'publicApiVersions'}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{kind: 'Field', name: {kind: 'Name', value: 'handle'}}, | ||
{kind: 'Field', name: {kind: 'Name', value: '__typename'}}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode<PublicApiVersionsQuery, PublicApiVersionsQueryVariables> |
16 changes: 16 additions & 0 deletions
16
packages/app/src/cli/api/graphql/webhooks/generated/types.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* eslint-disable @typescript-eslint/consistent-type-definitions, @typescript-eslint/naming-convention */ | ||
export type Maybe<T> = T | null | ||
export type InputMaybe<T> = Maybe<T> | ||
export type Exact<T extends {[key: string]: unknown}> = {[K in keyof T]: T[K]} | ||
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {[SubKey in K]?: Maybe<T[SubKey]>} | ||
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {[SubKey in K]: Maybe<T[SubKey]>} | ||
export type MakeEmpty<T extends {[key: string]: unknown}, K extends keyof T> = {[_ in K]?: never} | ||
export type Incremental<T> = T | {[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never} | ||
/** All built-in and custom scalars, mapped to their actual values */ | ||
export type Scalars = { | ||
ID: {input: string; output: string} | ||
String: {input: string; output: string} | ||
Boolean: {input: boolean; output: boolean} | ||
Int: {input: number; output: number} | ||
Float: {input: number; output: number} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/app/src/cli/api/graphql/webhooks/queries/available-topics.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
query availableTopics($apiVersion: String!) { | ||
availableTopics(apiVersion: $apiVersion) | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/app/src/cli/api/graphql/webhooks/queries/cli-testing.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
mutation CliTesting($address: String!, $apiKey: String, $apiVersion: String!, $deliveryMethod: String!, $sharedSecret: String!, $topic: String!) { | ||
cliTesting(address: $address, apiKey: $apiKey, apiVersion: $apiVersion, deliveryMethod: $deliveryMethod, sharedSecret: $sharedSecret, topic: $topic) { | ||
headers | ||
samplePayload | ||
success | ||
errors | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/app/src/cli/api/graphql/webhooks/queries/public-api-versions.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
query publicApiVersions { | ||
publicApiVersions { | ||
handle | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.