@shopify/shop-minis-cli 0.0.182 → 0.0.183

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.
Files changed (39) hide show
  1. package/build/data/partners/query.d.ts +1 -27
  2. package/build/data/partners/query.js +0 -28
  3. package/build/data/partners/query.js.map +1 -1
  4. package/build/data/partners/types.d.ts +0 -6
  5. package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +0 -23
  6. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +0 -3
  7. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -1
  8. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +67 -75
  9. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +16 -226
  10. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -1
  11. package/build/program.js +0 -2
  12. package/build/program.js.map +1 -1
  13. package/build/utils/allowed-dependencies.js +3 -0
  14. package/build/utils/allowed-dependencies.js.map +1 -1
  15. package/package.json +1 -1
  16. package/build/commands/app/index.d.ts +0 -2
  17. package/build/commands/app/index.js +0 -17
  18. package/build/commands/app/index.js.map +0 -1
  19. package/build/commands/app/link.d.ts +0 -2
  20. package/build/commands/app/link.js +0 -62
  21. package/build/commands/app/link.js.map +0 -1
  22. package/build/commands/app/list.d.ts +0 -2
  23. package/build/commands/app/list.js +0 -45
  24. package/build/commands/app/list.js.map +0 -1
  25. package/build/commands/app/unlink.d.ts +0 -2
  26. package/build/commands/app/unlink.js +0 -55
  27. package/build/commands/app/unlink.js.map +0 -1
  28. package/build/data/get-linked-apps.d.ts +0 -13
  29. package/build/data/get-linked-apps.js +0 -21
  30. package/build/data/get-linked-apps.js.map +0 -1
  31. package/build/data/mini-link-app.d.ts +0 -20
  32. package/build/data/mini-link-app.js +0 -35
  33. package/build/data/mini-link-app.js.map +0 -1
  34. package/build/data/mini-unlink-app.d.ts +0 -18
  35. package/build/data/mini-unlink-app.js +0 -25
  36. package/build/data/mini-unlink-app.js.map +0 -1
  37. package/build/utils/extract-id-gid.d.ts +0 -1
  38. package/build/utils/extract-id-gid.js +0 -16
  39. package/build/utils/extract-id-gid.js.map +0 -1
@@ -1,32 +1,6 @@
1
- import { AccountInfo, MinimalOrganizationApp, Organization, Paginateable } from './types.js';
1
+ import { AccountInfo, Organization } from './types.js';
2
2
  export declare const token: () => Promise<string>;
3
3
  export declare const CurrentAccountInfoQuery: string;
4
4
  export declare const AllOrgsQuery: string;
5
5
  export declare function fetchCurrentAccountInformation(): Promise<AccountInfo>;
6
6
  export declare function fetchAllOrgs(): Promise<Organization[]>;
7
- export declare const FindOrganizationQuery: string;
8
- export interface FindOrganizationQueryVariables {
9
- id: string;
10
- title?: string;
11
- }
12
- export interface FindOrganizationQuerySchema {
13
- organizations: {
14
- nodes: {
15
- id: string;
16
- businessName: string;
17
- apps: {
18
- pageInfo: {
19
- hasNextPage: boolean;
20
- };
21
- nodes: {
22
- id: string;
23
- title: string;
24
- apiKey: string;
25
- }[];
26
- };
27
- }[];
28
- };
29
- }
30
- export declare const fetchAppsForOrg: (organizationId: string) => Promise<Paginateable<{
31
- apps: MinimalOrganizationApp[];
32
- }>>;
@@ -75,34 +75,6 @@ export async function fetchAllOrgs() {
75
75
  }
76
76
  }
77
77
  }
78
- export const FindOrganizationQuery = gql `
79
- query FindOrganization($id: ID!, $title: String) {
80
- organizations(id: $id, first: 1) {
81
- nodes {
82
- id
83
- businessName
84
- apps(first: 25, title: $title) {
85
- pageInfo {
86
- hasNextPage
87
- }
88
- nodes {
89
- id
90
- title
91
- apiKey
92
- }
93
- }
94
- }
95
- }
96
- }
97
- `;
98
- export const fetchAppsForOrg = async (organizationId) => {
99
- const params = { id: organizationId };
100
- const result = await request(FindOrganizationQuery, params);
101
- return {
102
- apps: result.organizations.nodes[0].apps.nodes,
103
- hasMorePages: result.organizations.nodes[0].apps.pageInfo.hasNextPage,
104
- };
105
- };
106
78
  function mapAccountInfo(accountInfo) {
107
79
  if (accountInfo.__typename === 'UserAccount') {
108
80
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/data/partners/query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe;AACf,wBAAwB;EACzB,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAC,2BAA2B,EAAC,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,OAAO,EAOL,kBAAkB,GAGnB,MAAM,YAAY,CAAA;AAEnB,IAAI,QAAqC,CAAA;AACzC,IAAI,0BAAmD,CAAA;AAEvD,MAAM,OAAO,GAAG,KAAK,IAA8B,EAAE;IACnD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,MAAM,2BAA2B,EAAE,CAAA;QAC3D,kDAAkD;QAClD,QAAQ,GAAG;YACT,KAAK;YACL,WAAW,EAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;YACrC,MAAM;SACP,CAAA;QACD,MAAM,WAAW,GAAG,MAAM,8BAA8B,EAAE,CAAA;QAC1D,kDAAkD;QAClD,QAAQ,GAAG,EAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAC,CAAA;KACxC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,IAAqB,EAAE;IAC/C,OAAO,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC,KAAK,CAAA;AAChC,CAAC,CAAA;AAED,MAAM,OAAO,GAAG,KAAK,EACnB,KAAa,EACb,YAA0C,SAAS,EACvC,EAAE;IACd,OAAO,eAAe,CAAC,KAAK,EAAE,MAAM,KAAK,EAAE,EAAE,SAAS,CAAC,CAAA;AACzD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;;;;;CAYzC,CAAA;AAED,MAAM,CA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,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,WAAW,CAAC,KAAK;SACzB,CAAA;KACF;SAAM,IAAI,WAAW,CAAC,UAAU,KAAK,gBAAgB,EAAE;QACtD,OAAO;YACL,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,WAAW,CAAC,OAAO;SAC7B,CAAA;KACF;SAAM;QACL,OAAO,EAAC,IAAI,EAAE,gBAAgB,EAAC,CAAA;KAChC;AACH,CAAC"}
@@ -43,13 +43,7 @@ export interface Organization {
43
43
  businessName: string;
44
44
  source?: OrganizationSource;
45
45
  }
46
- export type Paginateable<T> = T & {
47
- hasMorePages: boolean;
48
- };
49
46
  export interface MinimalAppIdentifiers {
50
47
  id: string;
51
48
  apiKey: string;
52
49
  }
53
- export type MinimalOrganizationApp = MinimalAppIdentifiers & {
54
- title: string;
55
- };
@@ -25,9 +25,6 @@ declare const documents: {
25
25
  checksum: string;
26
26
  mimeType: string;
27
27
  }>>;
28
- '\n query LinkedApps {\n mini {\n productionShopifyApp {\n id\n title\n }\n developmentShopifyApps {\n id\n title\n }\n }\n }\n': DocumentNode<types.LinkedAppsQuery, types.Exact<{
29
- [key: string]: never;
30
- }>>;
31
28
  '\n query Submissions($first: Int) {\n submissions(first: $first) {\n nodes {\n reference\n description\n status\n submittedAt\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n': DocumentNode<types.SubmissionsQuery, types.Exact<{
32
29
  first?: types.InputMaybe<number> | undefined;
33
30
  }>>;
@@ -36,14 +33,6 @@ declare const documents: {
36
33
  organizationId: string;
37
34
  partnersAccessToken: string;
38
35
  }>>;
39
- '\n mutation MiniLinkApp(\n $appApiKey: String!\n $partnersAccessToken: String!\n $primary: Boolean\n ) {\n miniLinkApp(\n appApiKey: $appApiKey\n partnersAccessToken: $partnersAccessToken\n primary: $primary\n ) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': DocumentNode<types.MiniLinkAppMutation, types.Exact<{
40
- appApiKey: string;
41
- partnersAccessToken: string;
42
- primary?: types.InputMaybe<boolean> | undefined;
43
- }>>;
44
- '\n mutation MiniUnlinkApp($appId: ID!) {\n miniUnlinkApp(appId: $appId) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': DocumentNode<types.MiniUnlinkAppMutation, types.Exact<{
45
- appId: string;
46
- }>>;
47
36
  '\n query Mini {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n }\n': DocumentNode<types.MiniQuery, types.Exact<{
48
37
  [key: string]: never;
49
38
  }>>;
@@ -98,10 +87,6 @@ export declare function graphql(source: '\n mutation CreateSubmission(\n $de
98
87
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
99
88
  */
100
89
  export declare function graphql(source: '\n mutation CreateUpload(\n $filename: String!\n $fileSize: Int!\n $checksum: String!\n $mimeType: String!\n ) {\n submissionUploadCreate(\n input: {\n filename: $filename\n fileSize: $fileSize\n checksum: $checksum\n mimeType: $mimeType\n }\n ) {\n upload {\n url\n headers\n id\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n'): (typeof documents)['\n mutation CreateUpload(\n $filename: String!\n $fileSize: Int!\n $checksum: String!\n $mimeType: String!\n ) {\n submissionUploadCreate(\n input: {\n filename: $filename\n fileSize: $fileSize\n checksum: $checksum\n mimeType: $mimeType\n }\n ) {\n upload {\n url\n headers\n id\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n'];
101
- /**
102
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
103
- */
104
- export declare function graphql(source: '\n query LinkedApps {\n mini {\n productionShopifyApp {\n id\n title\n }\n developmentShopifyApps {\n id\n title\n }\n }\n }\n'): (typeof documents)['\n query LinkedApps {\n mini {\n productionShopifyApp {\n id\n title\n }\n developmentShopifyApps {\n id\n title\n }\n }\n }\n'];
105
90
  /**
106
91
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
107
92
  */
@@ -110,14 +95,6 @@ export declare function graphql(source: '\n query Submissions($first: Int) {\n
110
95
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
111
96
  */
112
97
  export declare function graphql(source: '\n mutation MiniCreate(\n $name: String!\n $organizationId: ID!\n $partnersAccessToken: String!\n ) {\n miniCreate(\n name: $name\n organizationId: $organizationId\n partnersAccessToken: $partnersAccessToken\n ) {\n mini {\n handle\n }\n token\n userErrors {\n code\n message\n field\n }\n }\n }\n'): (typeof documents)['\n mutation MiniCreate(\n $name: String!\n $organizationId: ID!\n $partnersAccessToken: String!\n ) {\n miniCreate(\n name: $name\n organizationId: $organizationId\n partnersAccessToken: $partnersAccessToken\n ) {\n mini {\n handle\n }\n token\n userErrors {\n code\n message\n field\n }\n }\n }\n'];
113
- /**
114
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
115
- */
116
- export declare function graphql(source: '\n mutation MiniLinkApp(\n $appApiKey: String!\n $partnersAccessToken: String!\n $primary: Boolean\n ) {\n miniLinkApp(\n appApiKey: $appApiKey\n partnersAccessToken: $partnersAccessToken\n primary: $primary\n ) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n'): (typeof documents)['\n mutation MiniLinkApp(\n $appApiKey: String!\n $partnersAccessToken: String!\n $primary: Boolean\n ) {\n miniLinkApp(\n appApiKey: $appApiKey\n partnersAccessToken: $partnersAccessToken\n primary: $primary\n ) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n'];
117
- /**
118
- * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
119
- */
120
- export declare function graphql(source: '\n mutation MiniUnlinkApp($appId: ID!) {\n miniUnlinkApp(appId: $appId) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n'): (typeof documents)['\n mutation MiniUnlinkApp($appId: ID!) {\n miniUnlinkApp(appId: $appId) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n'];
121
98
  /**
122
99
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
123
100
  */
@@ -14,11 +14,8 @@ const documents = {
14
14
  '\n mutation CancelSubmission($reference: String!) {\n submissionCancel(reference: $reference) {\n submission {\n reference\n description\n status\n submittedAt\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': types.CancelSubmissionDocument,
15
15
  '\n mutation CreateSubmission(\n $description: String!\n $uploadId: ID!\n $partnersAccessToken: String!\n ) {\n submissionCreate(\n description: $description\n uploadId: $uploadId\n partnersAccessToken: $partnersAccessToken\n ) {\n submission {\n reference\n description\n status\n submittedAt\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': types.CreateSubmissionDocument,
16
16
  '\n mutation CreateUpload(\n $filename: String!\n $fileSize: Int!\n $checksum: String!\n $mimeType: String!\n ) {\n submissionUploadCreate(\n input: {\n filename: $filename\n fileSize: $fileSize\n checksum: $checksum\n mimeType: $mimeType\n }\n ) {\n upload {\n url\n headers\n id\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': types.CreateUploadDocument,
17
- '\n query LinkedApps {\n mini {\n productionShopifyApp {\n id\n title\n }\n developmentShopifyApps {\n id\n title\n }\n }\n }\n': types.LinkedAppsDocument,
18
17
  '\n query Submissions($first: Int) {\n submissions(first: $first) {\n nodes {\n reference\n description\n status\n submittedAt\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n': types.SubmissionsDocument,
19
18
  '\n mutation MiniCreate(\n $name: String!\n $organizationId: ID!\n $partnersAccessToken: String!\n ) {\n miniCreate(\n name: $name\n organizationId: $organizationId\n partnersAccessToken: $partnersAccessToken\n ) {\n mini {\n handle\n }\n token\n userErrors {\n code\n message\n field\n }\n }\n }\n': types.MiniCreateDocument,
20
- '\n mutation MiniLinkApp(\n $appApiKey: String!\n $partnersAccessToken: String!\n $primary: Boolean\n ) {\n miniLinkApp(\n appApiKey: $appApiKey\n partnersAccessToken: $partnersAccessToken\n primary: $primary\n ) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': types.MiniLinkAppDocument,
21
- '\n mutation MiniUnlinkApp($appId: ID!) {\n miniUnlinkApp(appId: $appId) {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n userErrors {\n code\n message\n field\n }\n }\n }\n': types.MiniUnlinkAppDocument,
22
19
  '\n query Mini {\n mini {\n handle\n productionShopifyAppId\n developmentShopifyAppIds\n }\n }\n': types.MiniDocument,
23
20
  '\n query Proxies {\n proxies {\n allowedMethods\n appendedHeaders\n bodyJsonSchema\n targetUrlPattern\n userRateLimitInterval\n userRateLimitRequests\n }\n }\n': types.ProxiesDocument,
24
21
  '\n mutation ProxiesSet($proxies: [ProxyInput!]!) {\n proxiesSet(proxies: $proxies) {\n proxies {\n targetUrlPattern\n }\n userErrors {\n code\n message\n }\n }\n }\n': types.ProxiesSetDocument,
@@ -1 +1 @@
1
- {"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../../../src/data/types/autogenerated/shop-minis-admin-api/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAGrC;;;;;;;;;GASG;AACH,MAAM,SAAS,GAAG;IAChB,wSAAwS,EACtS,KAAK,CAAC,wBAAwB;IAChC,ycAAyc,EACvc,KAAK,CAAC,wBAAwB;IAChC,+cAA+c,EAC7c,KAAK,CAAC,oBAAoB;IAC5B,wLAAwL,EACtL,KAAK,CAAC,kBAAkB;IAC1B,4SAA4S,EAC1S,KAAK,CAAC,mBAAmB;IAC3B,oYAAoY,EAClY,KAAK,CAAC,kBAAkB;IAC1B,ybAAyb,EACvb,KAAK,CAAC,mBAAmB;IAC3B,iRAAiR,EAC/Q,KAAK,CAAC,qBAAqB;IAC7B,wHAAwH,EACtH,KAAK,CAAC,YAAY;IACpB,uMAAuM,EACrM,KAAK,CAAC,eAAe;IACvB,wNAAwN,EACtN,KAAK,CAAC,kBAAkB;IAC1B,oKAAoK,EAClK,KAAK,CAAC,oBAAoB;IAC5B,qKAAqK,EACnK,KAAK,CAAC,iBAAiB;IACzB,6DAA6D,EAC3D,KAAK,CAAC,eAAe;IACvB,qVAAqV,EACnV,KAAK,CAAC,qCAAqC;IAC7C,qQAAqQ,EACnQ,KAAK,CAAC,qCAAqC;IAC7C,0KAA0K,EACxK,KAAK,CAAC,gCAAgC;CACzC,CAAA;AAuHD,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAQ,SAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;AACzC,CAAC"}
1
+ {"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../../../src/data/types/autogenerated/shop-minis-admin-api/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAGrC;;;;;;;;;GASG;AACH,MAAM,SAAS,GAAG;IAChB,wSAAwS,EACtS,KAAK,CAAC,wBAAwB;IAChC,ycAAyc,EACvc,KAAK,CAAC,wBAAwB;IAChC,+cAA+c,EAC7c,KAAK,CAAC,oBAAoB;IAC5B,4SAA4S,EAC1S,KAAK,CAAC,mBAAmB;IAC3B,oYAAoY,EAClY,KAAK,CAAC,kBAAkB;IAC1B,wHAAwH,EACtH,KAAK,CAAC,YAAY;IACpB,uMAAuM,EACrM,KAAK,CAAC,eAAe;IACvB,wNAAwN,EACtN,KAAK,CAAC,kBAAkB;IAC1B,oKAAoK,EAClK,KAAK,CAAC,oBAAoB;IAC5B,qKAAqK,EACnK,KAAK,CAAC,iBAAiB;IACzB,6DAA6D,EAC3D,KAAK,CAAC,eAAe;IACvB,qVAAqV,EACnV,KAAK,CAAC,qCAAqC;IAC7C,qQAAqQ,EACnQ,KAAK,CAAC,qCAAqC;IAC7C,0KAA0K,EACxK,KAAK,CAAC,gCAAgC;CACzC,CAAA;AAqGD,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAQ,SAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;AACzC,CAAC"}
@@ -35,6 +35,56 @@ export type Scalars = {
35
35
  */
36
36
  URL: any;
37
37
  };
38
+ /** Return type for the `apiKeyGenerate` mutation. */
39
+ export type ApiKeyGeneratePayload = {
40
+ __typename?: 'ApiKeyGeneratePayload';
41
+ /** The title of the API key that was created. */
42
+ title?: Maybe<Scalars['String']>;
43
+ /** The API key token that was created. */
44
+ token?: Maybe<Scalars['String']>;
45
+ /** List of errors that occured while executing the mutation. */
46
+ userErrors: Array<ApiKeyGenerateUserError>;
47
+ };
48
+ /** A user or client error that could occur during the execution of the `apiKeyGenerate` mutation. */
49
+ export type ApiKeyGenerateUserError = {
50
+ __typename?: 'ApiKeyGenerateUserError';
51
+ /** Error code associated with the error. */
52
+ code: ApiKeyGenerateUserErrorCode;
53
+ /** Which input value this error came from. */
54
+ field?: Maybe<Array<Scalars['String']>>;
55
+ /** A description of the error. */
56
+ message: Scalars['String'];
57
+ };
58
+ /** Possible error codes that can be returned by ApiKeyGenerateUserError. */
59
+ export declare enum ApiKeyGenerateUserErrorCode {
60
+ /** Error code when the Mini is not found. */
61
+ MiniNotFound = "MINI_NOT_FOUND",
62
+ /** Error code when the organization has too many API keys. */
63
+ TooManyApiKeys = "TOO_MANY_API_KEYS",
64
+ /** Error code when verification failed. */
65
+ VerificationFailed = "VERIFICATION_FAILED"
66
+ }
67
+ /** Return type for the `apiKeyRevoke` mutation. */
68
+ export type ApiKeyRevokePayload = {
69
+ __typename?: 'ApiKeyRevokePayload';
70
+ /** List of errors that occured while executing the mutation. */
71
+ userErrors: Array<ApiKeyRevokeUserError>;
72
+ };
73
+ /** A user or client error that could occur during the execution of the `apiKeyRevoke` mutation. */
74
+ export type ApiKeyRevokeUserError = {
75
+ __typename?: 'ApiKeyRevokeUserError';
76
+ /** Error code associated with the error. */
77
+ code: ApiKeyRevokeUserErrorCode;
78
+ /** Which input value this error came from. */
79
+ field?: Maybe<Array<Scalars['String']>>;
80
+ /** A description of the error. */
81
+ message: Scalars['String'];
82
+ };
83
+ /** Possible error codes that can be returned by ApiKeyRevokeUserError. */
84
+ export declare enum ApiKeyRevokeUserErrorCode {
85
+ /** Error code when the API key is not found. */
86
+ UnknownApiKey = "UNKNOWN_API_KEY"
87
+ }
38
88
  /** Represents attribution details for a line item in an order. */
39
89
  export type Attribution = {
40
90
  __typename?: 'Attribution';
@@ -1261,6 +1311,10 @@ export type MoneyV2 = {
1261
1311
  };
1262
1312
  export type Mutation = {
1263
1313
  __typename?: 'Mutation';
1314
+ /** Generates an API key for a Mini. */
1315
+ apiKeyGenerate: ApiKeyGeneratePayload;
1316
+ /** Revokes an API key for a Mini. */
1317
+ apiKeyRevoke: ApiKeyRevokePayload;
1264
1318
  /** Creates a new content. */
1265
1319
  contentCreate: ContentCreatePayload;
1266
1320
  /** Asynchronously deletes all entry points for the given shopDomain. Entry points created or updated after performing the mutation will not be deleted. */
@@ -1306,6 +1360,13 @@ export type Mutation = {
1306
1360
  /** Verifies a user token. */
1307
1361
  userTokenVerify: UserTokenVerifyPayload;
1308
1362
  };
1363
+ export type MutationApiKeyGenerateArgs = {
1364
+ miniHandle: Scalars['String'];
1365
+ partnersAccessToken: Scalars['String'];
1366
+ };
1367
+ export type MutationApiKeyRevokeArgs = {
1368
+ title: Scalars['String'];
1369
+ };
1309
1370
  export type MutationContentCreateArgs = {
1310
1371
  description?: InputMaybe<Scalars['String']>;
1311
1372
  externalId?: InputMaybe<Scalars['ID']>;
@@ -2020,11 +2081,16 @@ export declare enum UserState {
2020
2081
  /** Return type for the `userTokenVerify` mutation. */
2021
2082
  export type UserTokenVerifyPayload = {
2022
2083
  __typename?: 'UserTokenVerifyPayload';
2084
+ /** The public ID of the user. */
2085
+ publicId?: Maybe<Scalars['String']>;
2023
2086
  /** The expiration date of the token. */
2024
2087
  tokenExpiresAt?: Maybe<Scalars['ISO8601DateTime']>;
2025
2088
  /** List of errors that occured while executing the mutation. */
2026
2089
  userErrors: Array<UserTokenVerifyUserError>;
2027
- /** A permanent identifier for the user. */
2090
+ /**
2091
+ * A permanent identifier for the user.
2092
+ * @deprecated Use publicId instead.
2093
+ */
2028
2094
  userIdentifier?: Maybe<Scalars['String']>;
2029
2095
  /** The state of the user. */
2030
2096
  userState?: Maybe<UserState>;
@@ -2255,25 +2321,6 @@ export type CreateUploadMutation = {
2255
2321
  }>;
2256
2322
  };
2257
2323
  };
2258
- export type LinkedAppsQueryVariables = Exact<{
2259
- [key: string]: never;
2260
- }>;
2261
- export type LinkedAppsQuery = {
2262
- __typename?: 'Query';
2263
- mini?: {
2264
- __typename?: 'Mini';
2265
- productionShopifyApp?: {
2266
- __typename?: 'ShopifyApp';
2267
- id: string;
2268
- title: string;
2269
- } | null;
2270
- developmentShopifyApps: Array<{
2271
- __typename?: 'ShopifyApp';
2272
- id: string;
2273
- title: string;
2274
- }>;
2275
- } | null;
2276
- };
2277
2324
  export type SubmissionsQueryVariables = Exact<{
2278
2325
  first?: InputMaybe<Scalars['Int']>;
2279
2326
  }>;
@@ -2319,50 +2366,6 @@ export type MiniCreateMutation = {
2319
2366
  }>;
2320
2367
  };
2321
2368
  };
2322
- export type MiniLinkAppMutationVariables = Exact<{
2323
- appApiKey: Scalars['String'];
2324
- partnersAccessToken: Scalars['String'];
2325
- primary?: InputMaybe<Scalars['Boolean']>;
2326
- }>;
2327
- export type MiniLinkAppMutation = {
2328
- __typename?: 'Mutation';
2329
- miniLinkApp: {
2330
- __typename?: 'MiniLinkAppPayload';
2331
- mini?: {
2332
- __typename?: 'Mini';
2333
- handle: string;
2334
- productionShopifyAppId?: string | null;
2335
- developmentShopifyAppIds: Array<string>;
2336
- } | null;
2337
- userErrors: Array<{
2338
- __typename?: 'MiniLinkAppUserError';
2339
- code: MiniLinkAppUserErrorCode;
2340
- message: string;
2341
- field?: Array<string> | null;
2342
- }>;
2343
- };
2344
- };
2345
- export type MiniUnlinkAppMutationVariables = Exact<{
2346
- appId: Scalars['ID'];
2347
- }>;
2348
- export type MiniUnlinkAppMutation = {
2349
- __typename?: 'Mutation';
2350
- miniUnlinkApp: {
2351
- __typename?: 'MiniUnlinkAppPayload';
2352
- mini?: {
2353
- __typename?: 'Mini';
2354
- handle: string;
2355
- productionShopifyAppId?: string | null;
2356
- developmentShopifyAppIds: Array<string>;
2357
- } | null;
2358
- userErrors: Array<{
2359
- __typename?: 'MiniUnlinkAppUserError';
2360
- code: MiniUnlinkAppUserErrorCode;
2361
- message: string;
2362
- field?: Array<string> | null;
2363
- }>;
2364
- };
2365
- };
2366
2369
  export type MiniQueryVariables = Exact<{
2367
2370
  [key: string]: never;
2368
2371
  }>;
@@ -2517,9 +2520,6 @@ export declare const CreateUploadDocument: DocumentNode<CreateUploadMutation, Ex
2517
2520
  checksum: Scalars['String'];
2518
2521
  mimeType: Scalars['String'];
2519
2522
  }>>;
2520
- export declare const LinkedAppsDocument: DocumentNode<LinkedAppsQuery, Exact<{
2521
- [key: string]: never;
2522
- }>>;
2523
2523
  export declare const SubmissionsDocument: DocumentNode<SubmissionsQuery, Exact<{
2524
2524
  first?: InputMaybe<number> | undefined;
2525
2525
  }>>;
@@ -2528,14 +2528,6 @@ export declare const MiniCreateDocument: DocumentNode<MiniCreateMutation, Exact<
2528
2528
  organizationId: Scalars['ID'];
2529
2529
  partnersAccessToken: Scalars['String'];
2530
2530
  }>>;
2531
- export declare const MiniLinkAppDocument: DocumentNode<MiniLinkAppMutation, Exact<{
2532
- appApiKey: Scalars['String'];
2533
- partnersAccessToken: Scalars['String'];
2534
- primary?: InputMaybe<boolean> | undefined;
2535
- }>>;
2536
- export declare const MiniUnlinkAppDocument: DocumentNode<MiniUnlinkAppMutation, Exact<{
2537
- appId: Scalars['ID'];
2538
- }>>;
2539
2531
  export declare const MiniDocument: DocumentNode<MiniQuery, Exact<{
2540
2532
  [key: string]: never;
2541
2533
  }>>;
@@ -1,3 +1,19 @@
1
+ /** Possible error codes that can be returned by ApiKeyGenerateUserError. */
2
+ export var ApiKeyGenerateUserErrorCode;
3
+ (function (ApiKeyGenerateUserErrorCode) {
4
+ /** Error code when the Mini is not found. */
5
+ ApiKeyGenerateUserErrorCode["MiniNotFound"] = "MINI_NOT_FOUND";
6
+ /** Error code when the organization has too many API keys. */
7
+ ApiKeyGenerateUserErrorCode["TooManyApiKeys"] = "TOO_MANY_API_KEYS";
8
+ /** Error code when verification failed. */
9
+ ApiKeyGenerateUserErrorCode["VerificationFailed"] = "VERIFICATION_FAILED";
10
+ })(ApiKeyGenerateUserErrorCode || (ApiKeyGenerateUserErrorCode = {}));
11
+ /** Possible error codes that can be returned by ApiKeyRevokeUserError. */
12
+ export var ApiKeyRevokeUserErrorCode;
13
+ (function (ApiKeyRevokeUserErrorCode) {
14
+ /** Error code when the API key is not found. */
15
+ ApiKeyRevokeUserErrorCode["UnknownApiKey"] = "UNKNOWN_API_KEY";
16
+ })(ApiKeyRevokeUserErrorCode || (ApiKeyRevokeUserErrorCode = {}));
1
17
  /** Possible error codes that can be returned by ContentCreateUserError. */
2
18
  export var ContentCreateUserErrorCode;
3
19
  (function (ContentCreateUserErrorCode) {
@@ -1068,52 +1084,6 @@ export const CreateUploadDocument = {
1068
1084
  },
1069
1085
  ],
1070
1086
  };
1071
- export const LinkedAppsDocument = {
1072
- kind: 'Document',
1073
- definitions: [
1074
- {
1075
- kind: 'OperationDefinition',
1076
- operation: 'query',
1077
- name: { kind: 'Name', value: 'LinkedApps' },
1078
- selectionSet: {
1079
- kind: 'SelectionSet',
1080
- selections: [
1081
- {
1082
- kind: 'Field',
1083
- name: { kind: 'Name', value: 'mini' },
1084
- selectionSet: {
1085
- kind: 'SelectionSet',
1086
- selections: [
1087
- {
1088
- kind: 'Field',
1089
- name: { kind: 'Name', value: 'productionShopifyApp' },
1090
- selectionSet: {
1091
- kind: 'SelectionSet',
1092
- selections: [
1093
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
1094
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
1095
- ],
1096
- },
1097
- },
1098
- {
1099
- kind: 'Field',
1100
- name: { kind: 'Name', value: 'developmentShopifyApps' },
1101
- selectionSet: {
1102
- kind: 'SelectionSet',
1103
- selections: [
1104
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
1105
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
1106
- ],
1107
- },
1108
- },
1109
- ],
1110
- },
1111
- },
1112
- ],
1113
- },
1114
- },
1115
- ],
1116
- };
1117
1087
  export const SubmissionsDocument = {
1118
1088
  kind: 'Document',
1119
1089
  definitions: [
@@ -1295,186 +1265,6 @@ export const MiniCreateDocument = {
1295
1265
  },
1296
1266
  ],
1297
1267
  };
1298
- export const MiniLinkAppDocument = {
1299
- kind: 'Document',
1300
- definitions: [
1301
- {
1302
- kind: 'OperationDefinition',
1303
- operation: 'mutation',
1304
- name: { kind: 'Name', value: 'MiniLinkApp' },
1305
- variableDefinitions: [
1306
- {
1307
- kind: 'VariableDefinition',
1308
- variable: {
1309
- kind: 'Variable',
1310
- name: { kind: 'Name', value: 'appApiKey' },
1311
- },
1312
- type: {
1313
- kind: 'NonNullType',
1314
- type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
1315
- },
1316
- },
1317
- {
1318
- kind: 'VariableDefinition',
1319
- variable: {
1320
- kind: 'Variable',
1321
- name: { kind: 'Name', value: 'partnersAccessToken' },
1322
- },
1323
- type: {
1324
- kind: 'NonNullType',
1325
- type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
1326
- },
1327
- },
1328
- {
1329
- kind: 'VariableDefinition',
1330
- variable: { kind: 'Variable', name: { kind: 'Name', value: 'primary' } },
1331
- type: { kind: 'NamedType', name: { kind: 'Name', value: 'Boolean' } },
1332
- },
1333
- ],
1334
- selectionSet: {
1335
- kind: 'SelectionSet',
1336
- selections: [
1337
- {
1338
- kind: 'Field',
1339
- name: { kind: 'Name', value: 'miniLinkApp' },
1340
- arguments: [
1341
- {
1342
- kind: 'Argument',
1343
- name: { kind: 'Name', value: 'appApiKey' },
1344
- value: {
1345
- kind: 'Variable',
1346
- name: { kind: 'Name', value: 'appApiKey' },
1347
- },
1348
- },
1349
- {
1350
- kind: 'Argument',
1351
- name: { kind: 'Name', value: 'partnersAccessToken' },
1352
- value: {
1353
- kind: 'Variable',
1354
- name: { kind: 'Name', value: 'partnersAccessToken' },
1355
- },
1356
- },
1357
- {
1358
- kind: 'Argument',
1359
- name: { kind: 'Name', value: 'primary' },
1360
- value: {
1361
- kind: 'Variable',
1362
- name: { kind: 'Name', value: 'primary' },
1363
- },
1364
- },
1365
- ],
1366
- selectionSet: {
1367
- kind: 'SelectionSet',
1368
- selections: [
1369
- {
1370
- kind: 'Field',
1371
- name: { kind: 'Name', value: 'mini' },
1372
- selectionSet: {
1373
- kind: 'SelectionSet',
1374
- selections: [
1375
- { kind: 'Field', name: { kind: 'Name', value: 'handle' } },
1376
- {
1377
- kind: 'Field',
1378
- name: { kind: 'Name', value: 'productionShopifyAppId' },
1379
- },
1380
- {
1381
- kind: 'Field',
1382
- name: { kind: 'Name', value: 'developmentShopifyAppIds' },
1383
- },
1384
- ],
1385
- },
1386
- },
1387
- {
1388
- kind: 'Field',
1389
- name: { kind: 'Name', value: 'userErrors' },
1390
- selectionSet: {
1391
- kind: 'SelectionSet',
1392
- selections: [
1393
- { kind: 'Field', name: { kind: 'Name', value: 'code' } },
1394
- { kind: 'Field', name: { kind: 'Name', value: 'message' } },
1395
- { kind: 'Field', name: { kind: 'Name', value: 'field' } },
1396
- ],
1397
- },
1398
- },
1399
- ],
1400
- },
1401
- },
1402
- ],
1403
- },
1404
- },
1405
- ],
1406
- };
1407
- export const MiniUnlinkAppDocument = {
1408
- kind: 'Document',
1409
- definitions: [
1410
- {
1411
- kind: 'OperationDefinition',
1412
- operation: 'mutation',
1413
- name: { kind: 'Name', value: 'MiniUnlinkApp' },
1414
- variableDefinitions: [
1415
- {
1416
- kind: 'VariableDefinition',
1417
- variable: { kind: 'Variable', name: { kind: 'Name', value: 'appId' } },
1418
- type: {
1419
- kind: 'NonNullType',
1420
- type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
1421
- },
1422
- },
1423
- ],
1424
- selectionSet: {
1425
- kind: 'SelectionSet',
1426
- selections: [
1427
- {
1428
- kind: 'Field',
1429
- name: { kind: 'Name', value: 'miniUnlinkApp' },
1430
- arguments: [
1431
- {
1432
- kind: 'Argument',
1433
- name: { kind: 'Name', value: 'appId' },
1434
- value: { kind: 'Variable', name: { kind: 'Name', value: 'appId' } },
1435
- },
1436
- ],
1437
- selectionSet: {
1438
- kind: 'SelectionSet',
1439
- selections: [
1440
- {
1441
- kind: 'Field',
1442
- name: { kind: 'Name', value: 'mini' },
1443
- selectionSet: {
1444
- kind: 'SelectionSet',
1445
- selections: [
1446
- { kind: 'Field', name: { kind: 'Name', value: 'handle' } },
1447
- {
1448
- kind: 'Field',
1449
- name: { kind: 'Name', value: 'productionShopifyAppId' },
1450
- },
1451
- {
1452
- kind: 'Field',
1453
- name: { kind: 'Name', value: 'developmentShopifyAppIds' },
1454
- },
1455
- ],
1456
- },
1457
- },
1458
- {
1459
- kind: 'Field',
1460
- name: { kind: 'Name', value: 'userErrors' },
1461
- selectionSet: {
1462
- kind: 'SelectionSet',
1463
- selections: [
1464
- { kind: 'Field', name: { kind: 'Name', value: 'code' } },
1465
- { kind: 'Field', name: { kind: 'Name', value: 'message' } },
1466
- { kind: 'Field', name: { kind: 'Name', value: 'field' } },
1467
- ],
1468
- },
1469
- },
1470
- ],
1471
- },
1472
- },
1473
- ],
1474
- },
1475
- },
1476
- ],
1477
- };
1478
1268
  export const MiniDocument = {
1479
1269
  kind: 'Document',
1480
1270
  definitions: [