@droz-js/sdk 0.4.10 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.4.10",
4
+ "version": "0.4.12",
5
5
  "private": false,
6
6
  "exports": {
7
7
  ".": "./src/index.js",
@@ -20,6 +20,10 @@ export declare const DrozAdmin: new (options?: import("./client/http").HttpClien
20
20
  listGitBranches(variables: import("./sdks/drozcommons").Exact<{
21
21
  gitRepositoryId: string;
22
22
  }>, options?: unknown): Promise<import("./sdks/drozcommons").ListGitBranchesQuery>;
23
+ getDeployment(variables: import("./sdks/drozcommons").Exact<{
24
+ tenantId: string;
25
+ deploymentId: string;
26
+ }>, options?: unknown): Promise<import("./sdks/drozcommons").GetDeploymentQuery>;
23
27
  listDeployments(variables: import("./sdks/drozcommons").Exact<{
24
28
  tenantId: string;
25
29
  limit?: number;
@@ -29,6 +33,15 @@ export declare const DrozAdmin: new (options?: import("./client/http").HttpClien
29
33
  deploymentId: string;
30
34
  next?: object;
31
35
  }>, options?: unknown): Promise<import("./sdks/drozcommons").DeploymentLogsQuery>;
36
+ deploy(variables: import("./sdks/drozcommons").Exact<{
37
+ input: import("./sdks/drozcommons").DeployInput;
38
+ }>, options?: unknown): Promise<import("./sdks/drozcommons").DeployMutation>;
39
+ destroy(variables: import("./sdks/drozcommons").Exact<{
40
+ input: import("./sdks/drozcommons").DestroyInput;
41
+ }>, options?: unknown): Promise<import("./sdks/drozcommons").DestroyMutation>;
42
+ batchDeploy(variables: import("./sdks/drozcommons").Exact<{
43
+ input: import("./sdks/drozcommons").BatchDeployInput;
44
+ }>, options?: unknown): Promise<import("./sdks/drozcommons").BatchDeployMutation>;
32
45
  listServices(variables: import("./sdks/drozcommons").Exact<{
33
46
  tenantId: string;
34
47
  }>, options?: unknown): Promise<import("./sdks/drozcommons").ListServicesQuery>;
@@ -205,6 +205,7 @@ export type Query = {
205
205
  app?: Maybe<Scalars['DRN']['output']>;
206
206
  authInfo?: Maybe<AuthInfo>;
207
207
  deploymentLogs: DeploymentLogConnection;
208
+ getDeployment: Deployment;
208
209
  getHttpEndpoint?: Maybe<Scalars['String']['output']>;
209
210
  getTenant?: Maybe<Tenant>;
210
211
  listAccounts: Array<AwsAccount>;
@@ -223,6 +224,10 @@ export type QueryDeploymentLogsArgs = {
223
224
  next?: InputMaybe<Scalars['Base64']['input']>;
224
225
  tenantId: Scalars['ID']['input'];
225
226
  };
227
+ export type QueryGetDeploymentArgs = {
228
+ deploymentId: Scalars['ID']['input'];
229
+ tenantId: Scalars['ID']['input'];
230
+ };
226
231
  export type QueryGetTenantArgs = {
227
232
  tenantId: Scalars['ID']['input'];
228
233
  };
@@ -303,6 +308,13 @@ export type ListGitBranchesQueryVariables = Exact<{
303
308
  export type ListGitBranchesQuery = {
304
309
  listGitBranches: Array<Pick<GitBranch, 'name'>>;
305
310
  };
311
+ export type GetDeploymentQueryVariables = Exact<{
312
+ tenantId: Scalars['ID']['input'];
313
+ deploymentId: Scalars['ID']['input'];
314
+ }>;
315
+ export type GetDeploymentQuery = {
316
+ getDeployment: DeploymentFragment;
317
+ };
306
318
  export type ListDeploymentsQueryVariables = Exact<{
307
319
  tenantId: Scalars['ID']['input'];
308
320
  limit?: InputMaybe<Scalars['Int']['input']>;
@@ -321,6 +333,24 @@ export type DeploymentLogsQuery = {
321
333
  pageInfo: Pick<PageInfo, 'hasNext' | 'next'>;
322
334
  };
323
335
  };
336
+ export type DeployMutationVariables = Exact<{
337
+ input: DeployInput;
338
+ }>;
339
+ export type DeployMutation = {
340
+ deploy: DeploymentFragment;
341
+ };
342
+ export type DestroyMutationVariables = Exact<{
343
+ input: DestroyInput;
344
+ }>;
345
+ export type DestroyMutation = {
346
+ destroy: DeploymentFragment;
347
+ };
348
+ export type BatchDeployMutationVariables = Exact<{
349
+ input: BatchDeployInput;
350
+ }>;
351
+ export type BatchDeployMutation = {
352
+ batchDeploy: Array<DeploymentFragment>;
353
+ };
324
354
  export type ServiceFragment = Pick<Service, 'accountId' | 'tenantId' | 'serviceId' | 'type' | 'endpoint'>;
325
355
  export type ListServicesQueryVariables = Exact<{
326
356
  tenantId: Scalars['ID']['input'];
@@ -381,8 +411,12 @@ export declare const GetAuthInfoDocument = "\n query getAuthInfo {\n authInf
381
411
  export declare const ListAccountsDocument = "\n query listAccounts {\n listAccounts {\n ...awsAccount\n }\n}\n \n fragment awsAccount on AwsAccount {\n id\n name\n tenantsCount\n}\n ";
382
412
  export declare const ListGitRepositoriesDocument = "\n query listGitRepositories {\n listGitRepositories {\n ...gitRepository\n }\n}\n \n fragment gitRepository on GitRepository {\n id\n name\n branches {\n ...gitBranch\n }\n}\n \n fragment gitBranch on GitBranch {\n name\n}\n ";
383
413
  export declare const ListGitBranchesDocument = "\n query listGitBranches($gitRepositoryId: ID!) {\n listGitBranches(gitRepositoryId: $gitRepositoryId) {\n name\n }\n}\n ";
414
+ export declare const GetDeploymentDocument = "\n query getDeployment($tenantId: ID!, $deploymentId: ID!) {\n getDeployment(tenantId: $tenantId, deploymentId: $deploymentId) {\n ...deployment\n }\n}\n \n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
384
415
  export declare const ListDeploymentsDocument = "\n query listDeployments($tenantId: ID!, $limit: Int) {\n listDeployments(tenantId: $tenantId, limit: $limit) {\n ...deployment\n }\n}\n \n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
385
416
  export declare const DeploymentLogsDocument = "\n query deploymentLogs($tenantId: ID!, $deploymentId: ID!, $next: Base64) {\n deploymentLogs(tenantId: $tenantId, deploymentId: $deploymentId, next: $next) {\n nodes {\n id\n deploymentId\n message\n timestamp\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n ";
417
+ export declare const DeployDocument = "\n mutation deploy($input: DeployInput!) {\n deploy(input: $input) {\n ...deployment\n }\n}\n \n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
418
+ export declare const DestroyDocument = "\n mutation destroy($input: DestroyInput!) {\n destroy(input: $input) {\n ...deployment\n }\n}\n \n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
419
+ export declare const BatchDeployDocument = "\n mutation batchDeploy($input: BatchDeployInput!) {\n batchDeploy(input: $input) {\n ...deployment\n }\n}\n \n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
386
420
  export declare const ListServicesDocument = "\n query listServices($tenantId: ID!) {\n listServices(tenantId: $tenantId) {\n ...service\n }\n}\n \n fragment service on Service {\n accountId\n tenantId\n serviceId\n type\n endpoint\n}\n ";
387
421
  export declare const GetTenantDocument = "\n query getTenant($tenantId: ID!, $withServices: Boolean = true, $withDeployments: Boolean = true) {\n getTenant(tenantId: $tenantId) {\n ...tenant\n services @include(if: $withServices) {\n ...service\n }\n deployments @include(if: $withDeployments) {\n ...deployment\n }\n }\n}\n \n fragment tenant on Tenant {\n accountId\n tenantId\n name\n deployedVersions\n disabled\n createdAt\n updatedAt\n account {\n id\n name\n }\n}\n \n\n fragment service on Service {\n accountId\n tenantId\n serviceId\n type\n endpoint\n}\n \n\n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
388
422
  export declare const ListTenantsDocument = "\n query listTenants($withServices: Boolean = false, $withDeployments: Boolean = false) {\n listTenants {\n ...tenant\n services @include(if: $withServices) {\n ...service\n }\n deployments @include(if: $withDeployments) {\n ...deployment\n }\n }\n}\n \n fragment tenant on Tenant {\n accountId\n tenantId\n name\n deployedVersions\n disabled\n createdAt\n updatedAt\n account {\n id\n name\n }\n}\n \n\n fragment service on Service {\n accountId\n tenantId\n serviceId\n type\n endpoint\n}\n \n\n fragment deployment on Deployment {\n id\n tenantId\n command\n gitRepository\n branch\n status\n message\n deployedVersion\n createdAt\n updatedAt\n}\n ";
@@ -396,8 +430,12 @@ export declare function getSdk<C, E>(requester: Requester<C, E>): {
396
430
  listAccounts(variables?: ListAccountsQueryVariables, options?: C): Promise<ListAccountsQuery>;
397
431
  listGitRepositories(variables?: ListGitRepositoriesQueryVariables, options?: C): Promise<ListGitRepositoriesQuery>;
398
432
  listGitBranches(variables: ListGitBranchesQueryVariables, options?: C): Promise<ListGitBranchesQuery>;
433
+ getDeployment(variables: GetDeploymentQueryVariables, options?: C): Promise<GetDeploymentQuery>;
399
434
  listDeployments(variables: ListDeploymentsQueryVariables, options?: C): Promise<ListDeploymentsQuery>;
400
435
  deploymentLogs(variables: DeploymentLogsQueryVariables, options?: C): Promise<DeploymentLogsQuery>;
436
+ deploy(variables: DeployMutationVariables, options?: C): Promise<DeployMutation>;
437
+ destroy(variables: DestroyMutationVariables, options?: C): Promise<DestroyMutation>;
438
+ batchDeploy(variables: BatchDeployMutationVariables, options?: C): Promise<BatchDeployMutation>;
401
439
  listServices(variables: ListServicesQueryVariables, options?: C): Promise<ListServicesQuery>;
402
440
  getTenant(variables: GetTenantQueryVariables, options?: C): Promise<GetTenantQuery>;
403
441
  listTenants(variables?: ListTenantsQueryVariables, options?: C): Promise<ListTenantsQuery>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.serviceName = exports.getSdk = exports.RemoveTenantDocument = exports.UpdateTenantDocument = exports.CreateTenantDocument = exports.ListTenantsDocument = exports.GetTenantDocument = exports.ListServicesDocument = exports.DeploymentLogsDocument = exports.ListDeploymentsDocument = exports.ListGitBranchesDocument = exports.ListGitRepositoriesDocument = exports.ListAccountsDocument = exports.GetAuthInfoDocument = exports.GetAmplifyConfigDocument = exports.TenantFragmentDoc = exports.ServiceFragmentDoc = exports.AwsAccountFragmentDoc = exports.GitRepositoryFragmentDoc = exports.GitBranchFragmentDoc = exports.DeploymentFragmentDoc = exports.Typenames = exports.DeploymentStatus = exports.DeploymentCommands = exports.AppInstanceStatus = void 0;
4
+ exports.serviceName = exports.getSdk = exports.RemoveTenantDocument = exports.UpdateTenantDocument = exports.CreateTenantDocument = exports.ListTenantsDocument = exports.GetTenantDocument = exports.ListServicesDocument = exports.BatchDeployDocument = exports.DestroyDocument = exports.DeployDocument = exports.DeploymentLogsDocument = exports.ListDeploymentsDocument = exports.GetDeploymentDocument = exports.ListGitBranchesDocument = exports.ListGitRepositoriesDocument = exports.ListAccountsDocument = exports.GetAuthInfoDocument = exports.GetAmplifyConfigDocument = exports.TenantFragmentDoc = exports.ServiceFragmentDoc = exports.AwsAccountFragmentDoc = exports.GitRepositoryFragmentDoc = exports.GitBranchFragmentDoc = exports.DeploymentFragmentDoc = exports.Typenames = exports.DeploymentStatus = exports.DeploymentCommands = exports.AppInstanceStatus = void 0;
5
5
  var AppInstanceStatus;
6
6
  (function (AppInstanceStatus) {
7
7
  AppInstanceStatus["Active"] = "Active";
@@ -126,6 +126,13 @@ exports.ListGitBranchesDocument = `
126
126
  }
127
127
  }
128
128
  `;
129
+ exports.GetDeploymentDocument = `
130
+ query getDeployment($tenantId: ID!, $deploymentId: ID!) {
131
+ getDeployment(tenantId: $tenantId, deploymentId: $deploymentId) {
132
+ ...deployment
133
+ }
134
+ }
135
+ ${exports.DeploymentFragmentDoc}`;
129
136
  exports.ListDeploymentsDocument = `
130
137
  query listDeployments($tenantId: ID!, $limit: Int) {
131
138
  listDeployments(tenantId: $tenantId, limit: $limit) {
@@ -149,6 +156,27 @@ exports.DeploymentLogsDocument = `
149
156
  }
150
157
  }
151
158
  `;
159
+ exports.DeployDocument = `
160
+ mutation deploy($input: DeployInput!) {
161
+ deploy(input: $input) {
162
+ ...deployment
163
+ }
164
+ }
165
+ ${exports.DeploymentFragmentDoc}`;
166
+ exports.DestroyDocument = `
167
+ mutation destroy($input: DestroyInput!) {
168
+ destroy(input: $input) {
169
+ ...deployment
170
+ }
171
+ }
172
+ ${exports.DeploymentFragmentDoc}`;
173
+ exports.BatchDeployDocument = `
174
+ mutation batchDeploy($input: BatchDeployInput!) {
175
+ batchDeploy(input: $input) {
176
+ ...deployment
177
+ }
178
+ }
179
+ ${exports.DeploymentFragmentDoc}`;
152
180
  exports.ListServicesDocument = `
153
181
  query listServices($tenantId: ID!) {
154
182
  listServices(tenantId: $tenantId) {
@@ -224,12 +252,24 @@ function getSdk(requester) {
224
252
  listGitBranches(variables, options) {
225
253
  return requester(exports.ListGitBranchesDocument, variables, options);
226
254
  },
255
+ getDeployment(variables, options) {
256
+ return requester(exports.GetDeploymentDocument, variables, options);
257
+ },
227
258
  listDeployments(variables, options) {
228
259
  return requester(exports.ListDeploymentsDocument, variables, options);
229
260
  },
230
261
  deploymentLogs(variables, options) {
231
262
  return requester(exports.DeploymentLogsDocument, variables, options);
232
263
  },
264
+ deploy(variables, options) {
265
+ return requester(exports.DeployDocument, variables, options);
266
+ },
267
+ destroy(variables, options) {
268
+ return requester(exports.DestroyDocument, variables, options);
269
+ },
270
+ batchDeploy(variables, options) {
271
+ return requester(exports.BatchDeployDocument, variables, options);
272
+ },
233
273
  listServices(variables, options) {
234
274
  return requester(exports.ListServicesDocument, variables, options);
235
275
  },