Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,58 +1,3 @@
import {gql} from 'graphql-request'

export const AllAppExtensionRegistrationsQuery = gql`
query allAppExtensionRegistrations($apiKey: String!) {
app(apiKey: $apiKey) {
extensionRegistrations {
id
uuid
title
type
draftVersion {
config
context
}
activeVersion {
config
context
}
}
configurationRegistrations {
id
uuid
title
type
draftVersion {
config
context
}
activeVersion {
config
context
}
}
dashboardManagedExtensionRegistrations {
id
uuid
title
type
activeVersion {
config
context
}
draftVersion {
config
context
}
}
}
}
`

export interface AllAppExtensionRegistrationsQueryVariables {
apiKey: string
}

export interface ExtensionRegistration {
id: string
uid?: string
Expand Down
48 changes: 0 additions & 48 deletions packages/app/src/cli/api/graphql/app_deploy.ts
Original file line number Diff line number Diff line change
@@ -1,52 +1,4 @@
import {UserError} from '../../utilities/developer-platform-client.js'
import {gql} from 'graphql-request'

// eslint-disable-next-line @shopify/cli/no-inline-graphql
export const AppDeploy = gql`
mutation AppDeploy(
$apiKey: String!
$bundleUrl: String
$appModules: [AppModuleSettings!]
$skipPublish: Boolean
$message: String
$versionTag: String
$commitReference: String
) {
appDeploy(
input: {
apiKey: $apiKey
bundleUrl: $bundleUrl
appModules: $appModules
skipPublish: $skipPublish
message: $message
versionTag: $versionTag
commitReference: $commitReference
}
) {
appVersion {
uuid
id
message
versionTag
location
appModuleVersions {
uuid
registrationUuid
validationErrors {
message
field
}
}
}
userErrors {
message
field
category
details
}
}
}
`

export interface AppModuleSettings {
uid?: string
Expand Down
25 changes: 0 additions & 25 deletions packages/app/src/cli/api/graphql/app_release.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
import {UserError} from '../../utilities/developer-platform-client.js'
import {gql} from 'graphql-request'
// eslint-disable-next-line @shopify/cli/no-inline-graphql
export const AppRelease = gql`
mutation AppRelease($apiKey: String!, $appVersionId: ID, $versionTag: String) {
appRelease(input: {apiKey: $apiKey, appVersionId: $appVersionId, versionTag: $versionTag}) {
appVersion {
versionTag
message
location
}
userErrors {
message
field
category
details
}
}
}
`

export interface AppReleaseVariables {
apiKey: string
versionTag?: string
appVersionId?: number
}

export interface AppReleaseSchema {
appRelease: {
Expand Down
44 changes: 0 additions & 44 deletions packages/app/src/cli/api/graphql/app_versions_diff.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
import {gql} from 'graphql-request'

export const AppVersionsDiffQuery = gql`
query AppVersionsDiff($apiKey: String!, $versionId: ID!) {
app(apiKey: $apiKey) {
versionsDiff(appVersionId: $versionId) {
added {
uuid
registrationTitle
specification {
identifier
experience
options {
managementExperience
}
}
}
updated {
uuid
registrationTitle
specification {
identifier
experience
options {
managementExperience
}
}
}
removed {
uuid
registrationTitle
specification {
identifier
experience
options {
managementExperience
}
}
}
}
}
}
`

export interface AppVersionsDiffExtensionSchema {
uuid: string
registrationTitle: string
Expand Down
57 changes: 0 additions & 57 deletions packages/app/src/cli/api/graphql/extension_specifications.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
import {gql} from 'graphql-request'

// eslint-disable-next-line @shopify/cli/no-inline-graphql
export const ExtensionSpecificationsQuery = gql`
query fetchSpecifications($apiKey: String!) {
extensionSpecifications(apiKey: $apiKey) {
name
externalName
externalIdentifier
identifier
gated
experience
options {
managementExperience
registrationLimit
}
features {
argo {
surface
}
}
validationSchema {
jsonSchema
}
}
}
`

export interface ExtensionSpecificationsQueryVariables {
apiKey: string
}

export interface RemoteSpecification {
name: string
externalName: string
Expand All @@ -45,28 +13,3 @@ export interface RemoteSpecification {
jsonSchema: string
} | null
}

interface PartnersRemoteSpecification {
name: string
externalName: string
identifier: string
gated: boolean
externalIdentifier: string
experience: 'extension' | 'configuration' | 'deprecated'
options: {
managementExperience: 'cli' | 'custom' | 'dashboard'
registrationLimit: number
}
features?: {
argo?: {
surface: string
}
}
validationSchema?: {
jsonSchema: string
} | null
}

export interface ExtensionSpecificationsQuerySchema {
extensionSpecifications: PartnersRemoteSpecification[]
}
30 changes: 0 additions & 30 deletions packages/app/src/cli/api/graphql/get_versions_list.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
import {gql} from 'graphql-request'

export const AppVersionsQuery = gql`
query AppVersionsQuery($apiKey: String!) {
app(apiKey: $apiKey) {
id
organizationId
title
appVersions {
nodes {
createdAt
createdBy {
displayName
}
message
status
versionTag
}
pageInfo {
totalResults
}
}
}
}
`

export interface AppVersionsQueryVariables {
apiKey: string
}

export interface AppVersionsQuerySchema {
app: {
id: string
Expand Down
20 changes: 0 additions & 20 deletions packages/app/src/cli/api/graphql/update_urls.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
import {gql} from 'graphql-request'

export const UpdateURLsQuery = gql`
mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!, $appProxy: AppProxyInput) {
appUpdate(
input: {
apiKey: $apiKey
applicationUrl: $applicationUrl
redirectUrlWhitelist: $redirectUrlWhitelist
appProxy: $appProxy
}
) {
userErrors {
message
field
}
}
}
`

export interface UpdateURLsVariables {
apiKey: string
applicationUrl: string
Expand Down
6 changes: 0 additions & 6 deletions packages/app/src/cli/services/webhook/request-api-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ export interface PublicApiVersionsSchema {
publicApiVersions: string[]
}

export const GetApiVersionsQuery = `
query getApiVersions {
publicApiVersions
}
`

/**
* Requests available api-versions in order to validate flags or present a list of options
*
Expand Down
14 changes: 0 additions & 14 deletions packages/app/src/cli/services/webhook/request-sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ export interface UserErrors {
fields: string[]
}

// eslint-disable-next-line @shopify/cli/no-inline-graphql
export const sendSampleWebhookMutation = `
mutation samplePayload($topic: String!, $api_version: String!, $address: String!, $delivery_method: String!, $shared_secret: String!, $api_key: String) {
sendSampleWebhook(input: {topic: $topic, apiVersion: $api_version, address: $address, deliveryMethod: $delivery_method, sharedSecret: $shared_secret, apiKey: $api_key}) {
samplePayload
success
headers
userErrors {
message
}
}
}
`

/**
* Request the sample to partners. Partners will call core and the webhook will be emitted
* In case the deliveryMethod is localhost and address is local, the response comes with the data the plugin
Expand Down
6 changes: 0 additions & 6 deletions packages/app/src/cli/services/webhook/request-topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ export interface WebhookTopicsSchema {
webhookTopics: string[]
}

export const getTopicsQuery = `
query getWebhookTopics($api_version: String!) {
webhookTopics(apiVersion: $api_version)
}
`

/**
* Requests topics for an api-version in order to validate flags or present a list of options
*
Expand Down
13 changes: 0 additions & 13 deletions packages/cli-kit/src/public/node/api/partners.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {addCursorAndFiltersToAppLogsUrl} from './utilities.js'
import {
graphqlRequest,
GraphQLVariables,
Expand Down Expand Up @@ -78,18 +77,6 @@ export async function partnersRequest<T>(
return result
}

export const generateFetchAppLogUrl = async (
cursor?: string,
filters?: {
status?: string
source?: string
},
): Promise<string> => {
const fqdn = await partnersFqdn()
const url = `https://${fqdn}/app_logs/poll`
return addCursorAndFiltersToAppLogsUrl(url, cursor, filters)
}

/**
* Executes a GraphQL query against the Partners API. Uses typed documents.
*
Expand Down
Loading
Loading