@copado/agentia-cli 0.9.0-alpha.0 → 0.11.0-alpha.0

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 (70) hide show
  1. package/README.md +318 -36
  2. package/dist/commands/auth/set.js +8 -2
  3. package/dist/commands/auth/set.js.map +1 -1
  4. package/dist/commands/environment/list.d.ts +6 -0
  5. package/dist/commands/environment/list.js +7 -2
  6. package/dist/commands/environment/list.js.map +1 -1
  7. package/dist/commands/project/list.d.ts +10 -0
  8. package/dist/commands/project/list.js +31 -0
  9. package/dist/commands/project/list.js.map +1 -0
  10. package/dist/commands/user/get.d.ts +10 -0
  11. package/dist/commands/user/get.js +32 -0
  12. package/dist/commands/user/get.js.map +1 -0
  13. package/dist/commands/work/create.d.ts +35 -0
  14. package/dist/commands/work/create.js +47 -0
  15. package/dist/commands/work/create.js.map +1 -0
  16. package/dist/commands/work/delete.d.ts +11 -0
  17. package/dist/commands/work/delete.js +29 -0
  18. package/dist/commands/work/delete.js.map +1 -0
  19. package/dist/commands/work/get.d.ts +10 -0
  20. package/dist/commands/work/get.js +29 -0
  21. package/dist/commands/work/get.js.map +1 -0
  22. package/dist/commands/work/list.d.ts +20 -0
  23. package/dist/commands/work/list.js +58 -0
  24. package/dist/commands/work/list.js.map +1 -0
  25. package/dist/commands/work/update.d.ts +38 -0
  26. package/dist/commands/work/update.js +52 -0
  27. package/dist/commands/work/update.js.map +1 -0
  28. package/dist/lib/cicd-gateway.js +3 -0
  29. package/dist/lib/cicd-gateway.js.map +1 -1
  30. package/dist/lib/defaults-store.d.ts +5 -0
  31. package/dist/lib/defaults-store.js +61 -0
  32. package/dist/lib/defaults-store.js.map +1 -1
  33. package/dist/lib/environment-auth-status.js +2 -5
  34. package/dist/lib/environment-auth-status.js.map +1 -1
  35. package/dist/lib/environment-auth.js +2 -5
  36. package/dist/lib/environment-auth.js.map +1 -1
  37. package/dist/lib/environment-flags.d.ts +11 -1
  38. package/dist/lib/environment-flags.js +29 -0
  39. package/dist/lib/environment-flags.js.map +1 -1
  40. package/dist/lib/environment-types.d.ts +8 -0
  41. package/dist/lib/environment-types.js +18 -0
  42. package/dist/lib/environment-types.js.map +1 -1
  43. package/dist/lib/mcp/tools.d.ts +55 -0
  44. package/dist/lib/mcp/tools.js +268 -2
  45. package/dist/lib/mcp/tools.js.map +1 -1
  46. package/dist/lib/project-flags.d.ts +8 -0
  47. package/dist/lib/project-flags.js +10 -0
  48. package/dist/lib/project-flags.js.map +1 -0
  49. package/dist/lib/project-types.d.ts +19 -0
  50. package/dist/lib/project-types.js +27 -0
  51. package/dist/lib/project-types.js.map +1 -0
  52. package/dist/lib/user-context-types.d.ts +6 -0
  53. package/dist/lib/user-context-types.js.map +1 -1
  54. package/dist/lib/user-context.d.ts +7 -0
  55. package/dist/lib/user-context.js +35 -0
  56. package/dist/lib/user-context.js.map +1 -0
  57. package/dist/lib/user-types.d.ts +9 -0
  58. package/dist/lib/user-types.js +21 -0
  59. package/dist/lib/user-types.js.map +1 -0
  60. package/dist/lib/work-defaults.d.ts +10 -0
  61. package/dist/lib/work-defaults.js +48 -0
  62. package/dist/lib/work-defaults.js.map +1 -0
  63. package/dist/lib/work-flags.d.ts +122 -0
  64. package/dist/lib/work-flags.js +231 -0
  65. package/dist/lib/work-flags.js.map +1 -0
  66. package/dist/lib/work-types.d.ts +115 -0
  67. package/dist/lib/work-types.js +87 -0
  68. package/dist/lib/work-types.js.map +1 -0
  69. package/oclif.manifest.json +1129 -388
  70. package/package.json +7 -1
@@ -0,0 +1,21 @@
1
+ import { cellValue } from './format.js';
2
+ import { normalizeSalesforceId } from './salesforce-id.js';
3
+ export const DEFAULT_USER_ID = 'me';
4
+ export function resolveUserId(userId) {
5
+ const trimmed = userId?.trim();
6
+ if (trimmed === undefined || trimmed.length === 0) {
7
+ return DEFAULT_USER_ID;
8
+ }
9
+ return trimmed.toLowerCase() === DEFAULT_USER_ID ? DEFAULT_USER_ID : normalizeSalesforceId(trimmed);
10
+ }
11
+ export function userEndpoint(userId = DEFAULT_USER_ID) {
12
+ return `/corpus/users/${resolveUserId(userId)}`;
13
+ }
14
+ export function formatUserDetail(user) {
15
+ return [
16
+ `ID: ${cellValue(user.id)}`,
17
+ `Full Name: ${cellValue(user.fullName)}`,
18
+ `Username: ${cellValue(user.username)}`,
19
+ ].join('\n');
20
+ }
21
+ //# sourceMappingURL=user-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-types.js","sourceRoot":"","sources":["../../src/lib/user-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAQxD,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAA;AAEnC,MAAM,UAAU,aAAa,CAAC,MAAsB;IAClD,MAAM,OAAO,GAAG,MAAM,EAAE,IAAI,EAAE,CAAA;IAC9B,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,OAAO,eAAe,CAAA;IACxB,CAAC;IAED,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAA;AACrG,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,SAAiB,eAAe;IAC3D,OAAO,iBAAiB,aAAa,CAAC,MAAM,CAAC,EAAE,CAAA;AACjD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACzC,OAAO;QACL,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QAC3B,cAAc,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QACxC,aAAa,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;KACxC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type ResolvedProjectDefault } from './project-defaults.js';
2
+ import { getUserContext } from './user-context.js';
3
+ import { type UserStoryMutationPayload } from './work-types.js';
4
+ export type BuildWorkDefaultsPayloadOptions = {
5
+ getUserContext?: typeof getUserContext;
6
+ resolveAssignee?: boolean;
7
+ };
8
+ export declare function buildWorkDefaultsPayload(resolved: ResolvedProjectDefault[], options?: BuildWorkDefaultsPayloadOptions): Promise<UserStoryMutationPayload>;
9
+ export declare function mergeWorkMutationPayload(explicit: UserStoryMutationPayload, defaults: UserStoryMutationPayload): UserStoryMutationPayload;
10
+ export declare function buildWorkCreatePayload(explicit: UserStoryMutationPayload, resolved: ResolvedProjectDefault[], options?: BuildWorkDefaultsPayloadOptions): Promise<UserStoryMutationPayload>;
@@ -0,0 +1,48 @@
1
+ import { getUserContext } from './user-context.js';
2
+ const PROJECT_DEFAULT_TO_PAYLOAD_KEY = {
3
+ environment: 'sourceEnvironment',
4
+ epic: 'epic',
5
+ feature: 'feature',
6
+ project: 'project',
7
+ sprint: 'sprintId',
8
+ team: 'team',
9
+ };
10
+ export async function buildWorkDefaultsPayload(resolved, options = {}) {
11
+ const getUserContextFn = options.getUserContext ?? getUserContext;
12
+ const resolveAssignee = options.resolveAssignee ?? true;
13
+ const payload = {};
14
+ const values = Object.fromEntries(resolved.map((entry) => [entry.key, entry.value]));
15
+ for (const defaultKey of Object.keys(PROJECT_DEFAULT_TO_PAYLOAD_KEY)) {
16
+ const value = values[defaultKey];
17
+ if (typeof value === 'string' && value.trim().length > 0) {
18
+ const payloadKey = PROJECT_DEFAULT_TO_PAYLOAD_KEY[defaultKey];
19
+ Object.assign(payload, { [payloadKey]: value });
20
+ }
21
+ }
22
+ if (resolveAssignee && values.assignMe === true) {
23
+ const userContext = await getUserContextFn();
24
+ const userId = userContext.id;
25
+ if (userId === undefined || userId.trim().length === 0) {
26
+ throw new Error('Current user ID is unavailable from the CICD gateway context.');
27
+ }
28
+ payload.assignee = userId;
29
+ }
30
+ return payload;
31
+ }
32
+ export function mergeWorkMutationPayload(explicit, defaults) {
33
+ const merged = { ...defaults };
34
+ for (const [key, value] of Object.entries(explicit)) {
35
+ if (value !== undefined) {
36
+ merged[key] = value;
37
+ }
38
+ }
39
+ return merged;
40
+ }
41
+ export async function buildWorkCreatePayload(explicit, resolved, options = {}) {
42
+ const defaults = await buildWorkDefaultsPayload(resolved, {
43
+ ...options,
44
+ resolveAssignee: options.resolveAssignee ?? explicit.assignee === undefined,
45
+ });
46
+ return mergeWorkMutationPayload(explicit, defaults);
47
+ }
48
+ //# sourceMappingURL=work-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-defaults.js","sourceRoot":"","sources":["../../src/lib/work-defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAGhD,MAAM,8BAA8B,GAAG;IACrC,WAAW,EAAE,mBAAmB;IAChC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,MAAM;CACqF,CAAA;AAOnG,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,QAAkC,EAClC,UAA2C,EAAE;IAE7C,MAAM,gBAAgB,GAAG,OAAO,CAAC,cAAc,IAAI,cAAc,CAAA;IACjE,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,IAAI,CAAA;IACvD,MAAM,OAAO,GAA6B,EAAE,CAAA;IAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAElF,CAAA;IAED,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAA6C,EAAE,CAAC;QACjH,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU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AAO;QACV,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;KAC5E,CAAC,CAAA;IAEF,OAAO,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACrD,CAAC"}
@@ -0,0 +1,122 @@
1
+ import { type UserStoryMutationPayload, type WorkListFilters } from './work-types.js';
2
+ export declare const workMutationStringFlags: {
3
+ readonly 'acceptance-criteria': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
4
+ readonly 'as-a': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
5
+ readonly assignee: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
6
+ readonly 'cancellation-reason': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ readonly 'close-date': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ readonly epic: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ readonly feature: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ readonly 'functional-requirements': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ readonly 'owner-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ readonly project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ readonly 'record-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ readonly 'release-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ readonly 'so-that': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ readonly 'source-credential': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ readonly 'source-environment': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ readonly 'sprint-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ readonly status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ readonly team: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ readonly 'technical-specifications': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ readonly theme: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ readonly title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
+ readonly 'want-to': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ };
26
+ export declare const workMutationIntegerFlags: {
27
+ readonly 'actual-points': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
+ readonly 'planned-points': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
+ readonly priority: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
30
+ };
31
+ export declare const workMutationBooleanFlags: {
32
+ readonly 'excluded-from-cbm': import("@oclif/core/interfaces").BooleanFlag<boolean>;
33
+ };
34
+ declare const WORK_MUTATION_FLAG_TO_PAYLOAD_KEY: {
35
+ readonly 'acceptance-criteria': "acceptanceCriteria";
36
+ readonly 'actual-points': "actualPoints";
37
+ readonly 'as-a': "asA";
38
+ readonly assignee: "assignee";
39
+ readonly 'cancellation-reason': "cancellationReason";
40
+ readonly 'close-date': "closeDate";
41
+ readonly epic: "epic";
42
+ readonly 'excluded-from-cbm': "excludedFromCbm";
43
+ readonly feature: "feature";
44
+ readonly 'functional-requirements': "functionalRequirements";
45
+ readonly 'owner-id': "ownerId";
46
+ readonly 'planned-points': "plannedPoints";
47
+ readonly priority: "priority";
48
+ readonly project: "project";
49
+ readonly 'record-type': "recordType";
50
+ readonly 'release-id': "releaseId";
51
+ readonly 'so-that': "soThat";
52
+ readonly 'source-credential': "sourceCredential";
53
+ readonly 'source-environment': "sourceEnvironment";
54
+ readonly 'sprint-id': "sprintId";
55
+ readonly status: "status";
56
+ readonly team: "team";
57
+ readonly 'technical-specifications': "technicalSpecifications";
58
+ readonly theme: "theme";
59
+ readonly title: "title";
60
+ readonly 'want-to': "wantTo";
61
+ };
62
+ type MutationStringFlagValues = {
63
+ [K in keyof typeof workMutationStringFlags]?: string;
64
+ };
65
+ type MutationIntegerFlagValues = {
66
+ [K in keyof typeof workMutationIntegerFlags]?: number;
67
+ };
68
+ type MutationBooleanFlagValues = {
69
+ [K in keyof typeof workMutationBooleanFlags]?: boolean;
70
+ };
71
+ export type WorkMutationFlagValues = MutationBooleanFlagValues & MutationIntegerFlagValues & MutationStringFlagValues;
72
+ export type WorkMutationFlagKey = keyof typeof WORK_MUTATION_FLAG_TO_PAYLOAD_KEY;
73
+ export declare const WORK_STRING_VALIDATION_KEYS: readonly ["acceptanceCriteria", "asA", "assignee", "cancellationReason", "closeDate", "epic", "feature", "functionalRequirements", "ownerId", "project", "recordType", "releaseId", "soThat", "sourceCredential", "sourceEnvironment", "sprintId", "status", "team", "technicalSpecifications", "theme", "title", "wantTo"];
74
+ export declare const workListFilterFlags: {
75
+ readonly 'assigned-to-me': import("@oclif/core/interfaces").BooleanFlag<boolean>;
76
+ readonly 'assignee-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
77
+ readonly 'assignee-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
78
+ readonly name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
79
+ readonly 'owned-by-me': import("@oclif/core/interfaces").BooleanFlag<boolean>;
80
+ readonly 'owner-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
81
+ readonly 'owner-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
82
+ readonly 'project-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
83
+ readonly 'project-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
84
+ readonly status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
85
+ readonly title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
86
+ };
87
+ export type WorkListFilterFlagValues = {
88
+ [K in keyof typeof workListFilterFlags]?: boolean | string;
89
+ };
90
+ export declare function buildWorkListFilters(flags: WorkListFilterFlagValues): WorkListFilters;
91
+ export declare const workMutationFlags: {
92
+ readonly 'acceptance-criteria': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
93
+ readonly 'as-a': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
94
+ readonly assignee: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
95
+ readonly 'cancellation-reason': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
96
+ readonly 'close-date': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
97
+ readonly epic: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
98
+ readonly feature: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
99
+ readonly 'functional-requirements': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
100
+ readonly 'owner-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
101
+ readonly project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
102
+ readonly 'record-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
103
+ readonly 'release-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
104
+ readonly 'so-that': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
105
+ readonly 'source-credential': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
106
+ readonly 'source-environment': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
107
+ readonly 'sprint-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
108
+ readonly status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
109
+ readonly team: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
110
+ readonly 'technical-specifications': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
111
+ readonly theme: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
112
+ readonly title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
113
+ readonly 'want-to': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
114
+ readonly 'actual-points': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
115
+ readonly 'planned-points': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
116
+ readonly priority: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
117
+ readonly 'excluded-from-cbm': import("@oclif/core/interfaces").BooleanFlag<boolean>;
118
+ };
119
+ export declare function collectWorkMutationFlagKeys(flags: WorkMutationFlagValues): WorkMutationFlagKey[];
120
+ export declare function buildWorkMutationPayload(flags: WorkMutationFlagValues): UserStoryMutationPayload;
121
+ export declare function validateNonEmptyStringFields(payload: UserStoryMutationPayload, keys: readonly (keyof UserStoryMutationPayload)[]): string | undefined;
122
+ export {};
@@ -0,0 +1,231 @@
1
+ import { Flags } from '@oclif/core';
2
+ export const workMutationStringFlags = {
3
+ 'acceptance-criteria': Flags.string({
4
+ description: 'Acceptance criteria',
5
+ }),
6
+ 'as-a': Flags.string({
7
+ description: 'User story "as a" clause',
8
+ }),
9
+ assignee: Flags.string({
10
+ description: 'Assignee ID',
11
+ }),
12
+ 'cancellation-reason': Flags.string({
13
+ description: 'Cancellation reason',
14
+ }),
15
+ 'close-date': Flags.string({
16
+ description: 'Close date',
17
+ }),
18
+ epic: Flags.string({
19
+ description: 'Epic',
20
+ }),
21
+ feature: Flags.string({
22
+ description: 'Feature',
23
+ }),
24
+ 'functional-requirements': Flags.string({
25
+ description: 'Functional requirements',
26
+ }),
27
+ 'owner-id': Flags.string({
28
+ description: 'Owner ID',
29
+ }),
30
+ project: Flags.string({
31
+ description: 'Project ID',
32
+ }),
33
+ 'record-type': Flags.string({
34
+ description: 'Record type',
35
+ }),
36
+ 'release-id': Flags.string({
37
+ description: 'Release ID',
38
+ }),
39
+ 'so-that': Flags.string({
40
+ description: 'User story "so that" clause',
41
+ }),
42
+ 'source-credential': Flags.string({
43
+ description: 'Source credential ID',
44
+ }),
45
+ 'source-environment': Flags.string({
46
+ description: 'Source environment ID',
47
+ }),
48
+ 'sprint-id': Flags.string({
49
+ description: 'Sprint ID',
50
+ }),
51
+ status: Flags.string({
52
+ description: 'Status',
53
+ }),
54
+ team: Flags.string({
55
+ description: 'Team',
56
+ }),
57
+ 'technical-specifications': Flags.string({
58
+ description: 'Technical specifications',
59
+ }),
60
+ theme: Flags.string({
61
+ description: 'Theme',
62
+ }),
63
+ title: Flags.string({
64
+ description: 'Title',
65
+ }),
66
+ 'want-to': Flags.string({
67
+ description: 'User story "want to" clause',
68
+ }),
69
+ };
70
+ export const workMutationIntegerFlags = {
71
+ 'actual-points': Flags.integer({
72
+ description: 'Actual points',
73
+ }),
74
+ 'planned-points': Flags.integer({
75
+ description: 'Planned points',
76
+ }),
77
+ priority: Flags.integer({
78
+ description: 'Priority',
79
+ }),
80
+ };
81
+ export const workMutationBooleanFlags = {
82
+ 'excluded-from-cbm': Flags.boolean({
83
+ allowNo: true,
84
+ description: 'Exclude from CBM',
85
+ }),
86
+ };
87
+ const WORK_MUTATION_FLAG_TO_PAYLOAD_KEY = {
88
+ 'acceptance-criteria': 'acceptanceCriteria',
89
+ 'actual-points': 'actualPoints',
90
+ 'as-a': 'asA',
91
+ assignee: 'assignee',
92
+ 'cancellation-reason': 'cancellationReason',
93
+ 'close-date': 'closeDate',
94
+ epic: 'epic',
95
+ 'excluded-from-cbm': 'excludedFromCbm',
96
+ feature: 'feature',
97
+ 'functional-requirements': 'functionalRequirements',
98
+ 'owner-id': 'ownerId',
99
+ 'planned-points': 'plannedPoints',
100
+ priority: 'priority',
101
+ project: 'project',
102
+ 'record-type': 'recordType',
103
+ 'release-id': 'releaseId',
104
+ 'so-that': 'soThat',
105
+ 'source-credential': 'sourceCredential',
106
+ 'source-environment': 'sourceEnvironment',
107
+ 'sprint-id': 'sprintId',
108
+ status: 'status',
109
+ team: 'team',
110
+ 'technical-specifications': 'technicalSpecifications',
111
+ theme: 'theme',
112
+ title: 'title',
113
+ 'want-to': 'wantTo',
114
+ };
115
+ const MUTATION_FLAG_KEYS = Object.keys(WORK_MUTATION_FLAG_TO_PAYLOAD_KEY);
116
+ export const WORK_STRING_VALIDATION_KEYS = [
117
+ 'acceptanceCriteria',
118
+ 'asA',
119
+ 'assignee',
120
+ 'cancellationReason',
121
+ 'closeDate',
122
+ 'epic',
123
+ 'feature',
124
+ 'functionalRequirements',
125
+ 'ownerId',
126
+ 'project',
127
+ 'recordType',
128
+ 'releaseId',
129
+ 'soThat',
130
+ 'sourceCredential',
131
+ 'sourceEnvironment',
132
+ 'sprintId',
133
+ 'status',
134
+ 'team',
135
+ 'technicalSpecifications',
136
+ 'theme',
137
+ 'title',
138
+ 'wantTo',
139
+ ];
140
+ export const workListFilterFlags = {
141
+ 'assigned-to-me': Flags.boolean({
142
+ description: 'Filter by the current user as assignee',
143
+ }),
144
+ 'assignee-id': Flags.string({
145
+ description: 'Filter by assignee ID',
146
+ }),
147
+ 'assignee-name': Flags.string({
148
+ description: 'Filter by assignee name',
149
+ }),
150
+ name: Flags.string({
151
+ description: 'Filter by name',
152
+ }),
153
+ 'owned-by-me': Flags.boolean({
154
+ description: 'Filter by the current user as owner',
155
+ }),
156
+ 'owner-id': Flags.string({
157
+ description: 'Filter by owner ID',
158
+ }),
159
+ 'owner-name': Flags.string({
160
+ description: 'Filter by owner name',
161
+ }),
162
+ 'project-id': Flags.string({
163
+ description: 'Filter by project ID',
164
+ }),
165
+ 'project-name': Flags.string({
166
+ description: 'Filter by project name',
167
+ }),
168
+ status: Flags.string({
169
+ description: 'Filter by status',
170
+ }),
171
+ title: Flags.string({
172
+ description: 'Filter by title',
173
+ }),
174
+ };
175
+ const WORK_LIST_FILTER_FLAG_TO_KEY = {
176
+ 'assignee-id': 'assigneeId',
177
+ 'assignee-name': 'assigneeName',
178
+ name: 'name',
179
+ 'owner-id': 'ownerId',
180
+ 'owner-name': 'ownerName',
181
+ 'project-id': 'projectId',
182
+ 'project-name': 'projectName',
183
+ status: 'status',
184
+ title: 'title',
185
+ };
186
+ export function buildWorkListFilters(flags) {
187
+ const filters = {};
188
+ for (const flagKey of Object.keys(WORK_LIST_FILTER_FLAG_TO_KEY)) {
189
+ const value = flags[flagKey];
190
+ if (typeof value === 'string') {
191
+ const filterKey = WORK_LIST_FILTER_FLAG_TO_KEY[flagKey];
192
+ Object.assign(filters, { [filterKey]: value });
193
+ }
194
+ }
195
+ return filters;
196
+ }
197
+ export const workMutationFlags = {
198
+ ...workMutationBooleanFlags,
199
+ ...workMutationIntegerFlags,
200
+ ...workMutationStringFlags,
201
+ };
202
+ export function collectWorkMutationFlagKeys(flags) {
203
+ const selected = [];
204
+ for (const key of MUTATION_FLAG_KEYS) {
205
+ if (flags[key] !== undefined) {
206
+ selected.push(key);
207
+ }
208
+ }
209
+ return selected;
210
+ }
211
+ export function buildWorkMutationPayload(flags) {
212
+ const payload = {};
213
+ for (const flagKey of MUTATION_FLAG_KEYS) {
214
+ const value = flags[flagKey];
215
+ if (value !== undefined) {
216
+ const payloadKey = WORK_MUTATION_FLAG_TO_PAYLOAD_KEY[flagKey];
217
+ Object.assign(payload, { [payloadKey]: value });
218
+ }
219
+ }
220
+ return payload;
221
+ }
222
+ export function validateNonEmptyStringFields(payload, keys) {
223
+ for (const key of keys) {
224
+ const value = payload[key];
225
+ if (typeof value === 'string' && value.trim().length === 0) {
226
+ return `${key} value cannot be empty`;
227
+ }
228
+ }
229
+ return undefined;
230
+ }
231
+ //# sourceMappingURL=work-flags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-flags.js","sourceRoot":"","sources":["../../src/lib/work-flags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAIjC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC;QAClC,WAAW,EAAE,qBAAqB;KACnC,CAAC;IACF,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,0BAA0B;KACxC,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC,M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A6B;IACvE,MAAM,QAAQ,GAA0B,EAAE,CAAA;IAE1C,KAAK,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACrC,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACpB,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,KAA6B;IACpE,MAAM,OAAO,GAA6B,EAAE,CAAA;IAE5C,KAAK,MAAM,OAAO,IAAI,kBAAkB,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;QAE5B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,UAAU,GAAG,iCAAiC,CAAC,OAAO,CAAC,CAAA;YAC7D,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAC,CAAC,UAAU,CAAC,EAAE,KAAK,EAAC,CAAC,CAAA;QAC/C,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAAiC,EACjC,IAAiD;IAEjD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;QAE1B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3D,OAAO,GAAG,GAAG,wBAAwB,CAAA;QACvC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC"}
@@ -0,0 +1,115 @@
1
+ export type UserStory = {
2
+ acceptanceCriteria?: string;
3
+ actualPoints?: number;
4
+ asA?: string;
5
+ assignee?: string;
6
+ assigneeName?: string;
7
+ baseBranch?: string;
8
+ cancellationReason?: string;
9
+ closeDate?: string;
10
+ components?: Record<string, string>[];
11
+ createdBy?: string;
12
+ createdDate?: string;
13
+ epic?: string;
14
+ excludedFromCbm?: boolean;
15
+ externalId?: string;
16
+ feature?: string;
17
+ functionalRequirements?: string;
18
+ id: string;
19
+ lastModifiedBy?: string;
20
+ lastModifiedDate?: string;
21
+ lastValidationDate?: string;
22
+ latestCommitDate?: string;
23
+ name?: string;
24
+ oauthSignature?: string;
25
+ owner?: string;
26
+ ownerId?: string;
27
+ pipelineActive?: boolean;
28
+ pipelineBlockCommits?: boolean;
29
+ pipelineId?: string;
30
+ plannedPoints?: number;
31
+ platform?: string;
32
+ points?: number;
33
+ priority?: number;
34
+ project?: string;
35
+ projectName?: string;
36
+ projectPipelineMainBranch?: string;
37
+ recordType?: string;
38
+ releaseBaseBranch?: string;
39
+ releaseId?: string;
40
+ releaseName?: string;
41
+ releaseProject?: string;
42
+ releaseProjectPipelineId?: string;
43
+ releaseProjectPipelineMainBranch?: string;
44
+ soThat?: string;
45
+ sourceCredential?: string;
46
+ sourceCredentialLink?: string;
47
+ sourceCredentialName?: string;
48
+ sourceEnvironment?: string;
49
+ sourceEnvironmentLink?: string;
50
+ sourceEnvironmentName?: string;
51
+ sourceOrgId?: string;
52
+ sprint?: string;
53
+ sprintId?: string;
54
+ sprintStartDate?: string;
55
+ status?: string;
56
+ team?: string;
57
+ technicalSpecifications?: string;
58
+ theme?: string;
59
+ title?: string;
60
+ wantTo?: string;
61
+ };
62
+ export type UserStoryListPage = {
63
+ currentPage?: number;
64
+ data?: UserStory[];
65
+ pageSize?: number;
66
+ totalPages?: number;
67
+ totalRecords?: number;
68
+ };
69
+ export type UserStoryListResponse = UserStory[] | UserStoryListPage;
70
+ export type UserStoryMutationPayload = {
71
+ acceptanceCriteria?: string;
72
+ actualPoints?: number;
73
+ asA?: string;
74
+ assignee?: string;
75
+ cancellationReason?: string;
76
+ closeDate?: string;
77
+ epic?: string;
78
+ excludedFromCbm?: boolean;
79
+ feature?: string;
80
+ functionalRequirements?: string;
81
+ ownerId?: string;
82
+ plannedPoints?: number;
83
+ priority?: number;
84
+ project?: string;
85
+ recordType?: string;
86
+ releaseId?: string;
87
+ soThat?: string;
88
+ sourceCredential?: string;
89
+ sourceEnvironment?: string;
90
+ sprintId?: string;
91
+ status?: string;
92
+ team?: string;
93
+ technicalSpecifications?: string;
94
+ theme?: string;
95
+ title?: string;
96
+ wantTo?: string;
97
+ };
98
+ export type WorkListFilters = {
99
+ assigneeId?: string;
100
+ assigneeName?: string;
101
+ name?: string;
102
+ ownerId?: string;
103
+ ownerName?: string;
104
+ projectId?: string;
105
+ projectName?: string;
106
+ status?: string;
107
+ title?: string;
108
+ };
109
+ export declare const WORK_LIST_FILTER_KEYS: readonly ["name", "title", "projectName", "projectId", "status", "ownerName", "ownerId", "assigneeName", "assigneeId"];
110
+ export declare function workListEndpoint(filters?: WorkListFilters): string;
111
+ export declare function workCreateEndpoint(): string;
112
+ export declare function workEndpoint(id: string): string;
113
+ export declare function normalizeUserStories(response: UserStoryListResponse): UserStory[];
114
+ export declare function formatUserStoryTable(userStories: UserStory[]): string;
115
+ export declare function formatUserStoryDetail(userStory: UserStory): string;