@camunda/ccma-api 14.3.0 → 14.5.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.
- package/dist/index.d.ts +6 -2
- package/dist/index.js +6 -0
- package/dist/index.js.map +2 -2
- package/dist/services/accounts/hdp.service.d.ts +20 -1
- package/dist/services/accounts/hdp.service.js +41 -0
- package/dist/services/accounts/hdp.service.js.map +2 -2
- package/dist/services/accounts/infra-notices.service.d.ts +27 -0
- package/dist/services/accounts/infra-notices.service.js +65 -0
- package/dist/services/accounts/infra-notices.service.js.map +7 -0
- package/dist/services/accounts/infra-notices.service.spec.d.ts +1 -0
- package/dist/services/console/console.admin.service.d.ts +25 -0
- package/dist/services/console/console.admin.service.js +34 -0
- package/dist/services/console/console.admin.service.js.map +2 -2
- package/dist/services/infra-notices/infra-notices.service.d.ts +35 -0
- package/dist/services/infra-notices/infra-notices.service.js +86 -0
- package/dist/services/infra-notices/infra-notices.service.js.map +7 -0
- package/dist/services/infra-notices/infra-notices.service.spec.d.ts +1 -0
- package/dist/services/infra-notices/infra-notices.types.d.ts +140 -0
- package/dist/services/infra-notices/infra-notices.types.js +1 -0
- package/dist/services/infra-notices/infra-notices.types.js.map +7 -0
- package/dist/utils/environments.d.ts +1 -1
- package/dist/utils/environments.js +7 -0
- package/dist/utils/environments.js.map +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RequestBaseParams } from '../../types/general.types.js';
|
|
2
|
+
import type { AdminNoticeDetail, AdminNoticeList, AdminOrgNotices, DeliveryStatus, OrgNoticePage } from './infra-notices.types.js';
|
|
3
|
+
export interface GetOrgNoticesRequest extends RequestBaseParams {
|
|
4
|
+
params: {
|
|
5
|
+
orgId: string;
|
|
6
|
+
/** The `nextCursor` of the page before. */
|
|
7
|
+
cursor?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface GetAdminNoticeRequest extends RequestBaseParams {
|
|
11
|
+
params: {
|
|
12
|
+
noticeId: string;
|
|
13
|
+
/** Lists only the orgs with a row of this status. */
|
|
14
|
+
status?: DeliveryStatus;
|
|
15
|
+
/** The `nextCursor` of the page before. */
|
|
16
|
+
cursor?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface GetAdminOrgNoticesRequest extends RequestBaseParams {
|
|
20
|
+
params: {
|
|
21
|
+
/** A lowercase uuid. */
|
|
22
|
+
orgId: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare class InfraNoticesService {
|
|
26
|
+
/** One page of the notices of an org, for a member of the org. */
|
|
27
|
+
static getOrgNotices(params: GetOrgNoticesRequest): Promise<OrgNoticePage>;
|
|
28
|
+
/** Each notice and each refused file. Camundi with `aara` only. */
|
|
29
|
+
static listAdminNotices(params: RequestBaseParams): Promise<AdminNoticeList>;
|
|
30
|
+
/** One notice with one page of its orgs. Camundi with `aara` only. */
|
|
31
|
+
static getAdminNotice(params: GetAdminNoticeRequest): Promise<AdminNoticeDetail>;
|
|
32
|
+
/** The notices of an org with its ledger rows. Camundi with `aara` only. */
|
|
33
|
+
static getAdminOrgNotices(params: GetAdminOrgNoticesRequest): Promise<AdminOrgNotices>;
|
|
34
|
+
private static get;
|
|
35
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { request } from "../../utils/api.js";
|
|
2
|
+
import { HttpError } from "../../utils/errors.js";
|
|
3
|
+
const BASE = { id: "infra-notices" };
|
|
4
|
+
class InfraNoticesService {
|
|
5
|
+
/** One page of the notices of an org, for a member of the org. */
|
|
6
|
+
static async getOrgNotices(params) {
|
|
7
|
+
const { orgId, cursor } = params.params;
|
|
8
|
+
return InfraNoticesService.get(
|
|
9
|
+
params,
|
|
10
|
+
"getOrgNotices",
|
|
11
|
+
`orgs/${encodeURIComponent(orgId)}/notices${query({ cursor })}`,
|
|
12
|
+
"orgs/:orgId/notices"
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
/** Each notice and each refused file. Camundi with `aara` only. */
|
|
16
|
+
static async listAdminNotices(params) {
|
|
17
|
+
return InfraNoticesService.get(
|
|
18
|
+
params,
|
|
19
|
+
"listAdminNotices",
|
|
20
|
+
"admin/notices",
|
|
21
|
+
"admin/notices"
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
/** One notice with one page of its orgs. Camundi with `aara` only. */
|
|
25
|
+
static async getAdminNotice(params) {
|
|
26
|
+
const { noticeId, status, cursor } = params.params;
|
|
27
|
+
return InfraNoticesService.get(
|
|
28
|
+
params,
|
|
29
|
+
"getAdminNotice",
|
|
30
|
+
`admin/notices/${encodeURIComponent(noticeId)}${query({ status, cursor })}`,
|
|
31
|
+
"admin/notices/:noticeId"
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
/** The notices of an org with its ledger rows. Camundi with `aara` only. */
|
|
35
|
+
static async getAdminOrgNotices(params) {
|
|
36
|
+
return InfraNoticesService.get(
|
|
37
|
+
params,
|
|
38
|
+
"getAdminOrgNotices",
|
|
39
|
+
`admin/orgs/${encodeURIComponent(params.params.orgId)}/notices`,
|
|
40
|
+
"admin/orgs/:orgId/notices"
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
static async get(params, name, url, normalizedUrl) {
|
|
44
|
+
const serviceContext = {
|
|
45
|
+
method: {
|
|
46
|
+
name: `InfraNoticesService.${name}`,
|
|
47
|
+
url: normalizedUrl,
|
|
48
|
+
normalizedUrl,
|
|
49
|
+
type: "get"
|
|
50
|
+
},
|
|
51
|
+
source: params.config.metrics?.source || "unset",
|
|
52
|
+
target: { name: "infra-notices", type: "internal" }
|
|
53
|
+
};
|
|
54
|
+
const response = await request({
|
|
55
|
+
...params,
|
|
56
|
+
config: params.config,
|
|
57
|
+
base: BASE,
|
|
58
|
+
url,
|
|
59
|
+
logUrl: normalizedUrl,
|
|
60
|
+
method: "get",
|
|
61
|
+
metricsDetails: serviceContext
|
|
62
|
+
});
|
|
63
|
+
if (!response.ok || !response.body) {
|
|
64
|
+
throw new HttpError(
|
|
65
|
+
`${serviceContext.method.name}: ${response.status} ${response.statusText}`,
|
|
66
|
+
response.status,
|
|
67
|
+
response.statusText
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return response.body;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function query(values) {
|
|
74
|
+
const search = new URLSearchParams();
|
|
75
|
+
for (const [key, value] of Object.entries(values)) {
|
|
76
|
+
if (value !== void 0 && value !== "") {
|
|
77
|
+
search.set(key, value);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const text = search.toString();
|
|
81
|
+
return text ? `?${text}` : "";
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
InfraNoticesService
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=infra-notices.service.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/services/infra-notices/infra-notices.service.ts"],
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { RequestBaseParams } from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\nimport type {\n AdminNoticeDetail,\n AdminNoticeList,\n AdminOrgNotices,\n DeliveryStatus,\n OrgNoticePage,\n} from './infra-notices.types.js'\n\n/**\n * The routes of the infra-notices service: section 5 of\n * `docs/infra-notices/contracts.md`. Each route answers 404 while the flag\n * `shared.infraNotices` is off for the caller, and 503 until the service has\n * read the notices and the fleet once.\n */\n\nconst BASE = { id: 'infra-notices' } as const\n\nexport interface GetOrgNoticesRequest extends RequestBaseParams {\n params: {\n orgId: string\n /** The `nextCursor` of the page before. */\n cursor?: string\n }\n}\n\nexport interface GetAdminNoticeRequest extends RequestBaseParams {\n params: {\n noticeId: string\n /** Lists only the orgs with a row of this status. */\n status?: DeliveryStatus\n /** The `nextCursor` of the page before. */\n cursor?: string\n }\n}\n\nexport interface GetAdminOrgNoticesRequest extends RequestBaseParams {\n params: {\n /** A lowercase uuid. */\n orgId: string\n }\n}\n\nexport class InfraNoticesService {\n /** One page of the notices of an org, for a member of the org. */\n public static async getOrgNotices(\n params: GetOrgNoticesRequest,\n ): Promise<OrgNoticePage> {\n const { orgId, cursor } = params.params\n return InfraNoticesService.get<OrgNoticePage>(\n params,\n 'getOrgNotices',\n `orgs/${encodeURIComponent(orgId)}/notices${query({ cursor })}`,\n 'orgs/:orgId/notices',\n )\n }\n\n /** Each notice and each refused file. Camundi with `aara` only. */\n public static async listAdminNotices(\n params: RequestBaseParams,\n ): Promise<AdminNoticeList> {\n return InfraNoticesService.get<AdminNoticeList>(\n params,\n 'listAdminNotices',\n 'admin/notices',\n 'admin/notices',\n )\n }\n\n /** One notice with one page of its orgs. Camundi with `aara` only. */\n public static async getAdminNotice(\n params: GetAdminNoticeRequest,\n ): Promise<AdminNoticeDetail> {\n const { noticeId, status, cursor } = params.params\n return InfraNoticesService.get<AdminNoticeDetail>(\n params,\n 'getAdminNotice',\n `admin/notices/${encodeURIComponent(noticeId)}${query({ status, cursor })}`,\n 'admin/notices/:noticeId',\n )\n }\n\n /** The notices of an org with its ledger rows. Camundi with `aara` only. */\n public static async getAdminOrgNotices(\n params: GetAdminOrgNoticesRequest,\n ): Promise<AdminOrgNotices> {\n return InfraNoticesService.get<AdminOrgNotices>(\n params,\n 'getAdminOrgNotices',\n `admin/orgs/${encodeURIComponent(params.params.orgId)}/notices`,\n 'admin/orgs/:orgId/notices',\n )\n }\n\n private static async get<TResponse>(\n params: RequestBaseParams,\n name: string,\n url: string,\n normalizedUrl: string,\n ): Promise<TResponse> {\n const serviceContext = {\n method: {\n name: `InfraNoticesService.${name}`,\n url: normalizedUrl,\n normalizedUrl,\n type: 'get' as const,\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'infra-notices', type: 'internal' as const },\n }\n const response = await request<TResponse>({\n ...params,\n config: params.config,\n base: BASE,\n url,\n logUrl: normalizedUrl,\n method: 'get',\n metricsDetails: serviceContext,\n })\n if (!response.ok || !response.body) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n}\n\nfunction query(values: Record<string, string | undefined>): string {\n const search = new URLSearchParams()\n for (const [key, value] of Object.entries(values)) {\n if (value !== undefined && value !== '') {\n search.set(key, value)\n }\n }\n // `URLSearchParams.size` is missing in older browsers.\n const text = search.toString()\n return text ? `?${text}` : ''\n}\n"],
|
|
5
|
+
"mappings": "AAOA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAgB1B,MAAM,OAAO,EAAE,IAAI,gBAAgB;AA2B5B,MAAM,oBAAoB;AAAA;AAAA,EAE/B,aAAoB,cAClB,QACwB;AACxB,UAAM,EAAE,OAAO,OAAO,IAAI,OAAO;AACjC,WAAO,oBAAoB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,QAAQ,mBAAmB,KAAK,CAAC,WAAW,MAAM,EAAE,OAAO,CAAC,CAAC;AAAA,MAC7D;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,aAAoB,iBAClB,QAC0B;AAC1B,WAAO,oBAAoB;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,aAAoB,eAClB,QAC4B;AAC5B,UAAM,EAAE,UAAU,QAAQ,OAAO,IAAI,OAAO;AAC5C,WAAO,oBAAoB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,iBAAiB,mBAAmB,QAAQ,CAAC,GAAG,MAAM,EAAE,QAAQ,OAAO,CAAC,CAAC;AAAA,MACzE;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,aAAoB,mBAClB,QAC0B;AAC1B,WAAO,oBAAoB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,cAAc,mBAAmB,OAAO,OAAO,KAAK,CAAC;AAAA,MACrD;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAqB,IACnB,QACA,MACA,KACA,eACoB;AACpB,UAAM,iBAAiB;AAAA,MACrB,QAAQ;AAAA,QACN,MAAM,uBAAuB,IAAI;AAAA,QACjC,KAAK;AAAA,QACL;AAAA,QACA,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,iBAAiB,MAAM,WAAoB;AAAA,IAC7D;AACA,UAAM,WAAW,MAAM,QAAmB;AAAA,MACxC,GAAG;AAAA,MACH,QAAQ,OAAO;AAAA,MACf,MAAM;AAAA,MACN;AAAA,MACA,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,gBAAgB;AAAA,IAClB,CAAC;AACD,QAAI,CAAC,SAAS,MAAM,CAAC,SAAS,MAAM;AAClC,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AACA,WAAO,SAAS;AAAA,EAClB;AACF;AAEA,SAAS,MAAM,QAAoD;AACjE,QAAM,SAAS,IAAI,gBAAgB;AACnC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,MAAM,GAAG;AACjD,QAAI,UAAU,UAAa,UAAU,IAAI;AACvC,aAAO,IAAI,KAAK,KAAK;AAAA,IACvB;AAAA,EACF;AAEA,QAAM,OAAO,OAAO,SAAS;AAC7B,SAAO,OAAO,IAAI,IAAI,KAAK;AAC7B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bodies of the infra-notices service, as section 5.5 of
|
|
3
|
+
* `docs/infra-notices/contracts.md` gives them. All times are RFC 3339 strings
|
|
4
|
+
* in UTC. An optional field is left out, never `null`.
|
|
5
|
+
*/
|
|
6
|
+
export type NoticeKind = 'planned' | 'incident';
|
|
7
|
+
export type NoticeStatus = 'scheduled' | 'cancelled' | 'resolved';
|
|
8
|
+
export type NoticeImpact = 'none' | 'reconnects' | 'degraded' | 'unavailable';
|
|
9
|
+
export type NoticePhase = 'upcoming' | 'ongoing' | 'past';
|
|
10
|
+
export type EmailKind = 'planned' | 'reminder' | 'updated' | 'cancelled' | 'incident' | 'resolved';
|
|
11
|
+
export type DeliveryStatus = 'pending' | 'sent' | 'failed' | 'no_recipients' | 'flag_off';
|
|
12
|
+
export interface NoticeUpdate {
|
|
13
|
+
at: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
16
|
+
export interface NoticeCluster {
|
|
17
|
+
uuid: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export interface OrgNotice {
|
|
21
|
+
id: string;
|
|
22
|
+
kind: NoticeKind;
|
|
23
|
+
status: NoticeStatus;
|
|
24
|
+
phase: NoticePhase;
|
|
25
|
+
title: string;
|
|
26
|
+
summary: string;
|
|
27
|
+
impact: NoticeImpact;
|
|
28
|
+
startsAt: string;
|
|
29
|
+
endsAt?: string;
|
|
30
|
+
updates: NoticeUpdate[];
|
|
31
|
+
clusters: NoticeCluster[];
|
|
32
|
+
}
|
|
33
|
+
export interface OrgNoticePage {
|
|
34
|
+
notices: OrgNotice[];
|
|
35
|
+
nextCursor?: string;
|
|
36
|
+
}
|
|
37
|
+
/** A key with no value is left out. */
|
|
38
|
+
export interface ScopeKeys {
|
|
39
|
+
regions?: string[];
|
|
40
|
+
generations?: string[];
|
|
41
|
+
clusterIds?: string[];
|
|
42
|
+
orgIds?: string[];
|
|
43
|
+
}
|
|
44
|
+
export type NoticeScope = 'all' | ScopeKeys;
|
|
45
|
+
export type DeliveryCounts = Record<DeliveryStatus, number>;
|
|
46
|
+
export interface AdminNoticeSummary {
|
|
47
|
+
id: string;
|
|
48
|
+
kind: NoticeKind;
|
|
49
|
+
status: NoticeStatus;
|
|
50
|
+
phase: NoticePhase;
|
|
51
|
+
title: string;
|
|
52
|
+
impact: NoticeImpact;
|
|
53
|
+
startsAt: string;
|
|
54
|
+
endsAt?: string;
|
|
55
|
+
remindAt?: string;
|
|
56
|
+
/** `remindAt` while a reminder can still go out. */
|
|
57
|
+
nextReminderAt?: string;
|
|
58
|
+
/** The orgs in the current scope. */
|
|
59
|
+
orgsInScope: number;
|
|
60
|
+
/** All ledger rows of the notice, by status. */
|
|
61
|
+
rows: DeliveryCounts;
|
|
62
|
+
/** The sum of `sent_count`. */
|
|
63
|
+
recipientsSent: number;
|
|
64
|
+
/** The sum of `failed_count`. */
|
|
65
|
+
recipientsFailed: number;
|
|
66
|
+
githubUrl: string;
|
|
67
|
+
}
|
|
68
|
+
export interface AdminNotice extends AdminNoticeSummary {
|
|
69
|
+
summary: string;
|
|
70
|
+
updates: NoticeUpdate[];
|
|
71
|
+
scope: NoticeScope;
|
|
72
|
+
}
|
|
73
|
+
export interface RefusedFile {
|
|
74
|
+
/** For example `notices/2026-12-03-envoy.yaml`. */
|
|
75
|
+
path: string;
|
|
76
|
+
/** Left out for `bad_path`. */
|
|
77
|
+
id?: string;
|
|
78
|
+
/** Left out for `deleted`. */
|
|
79
|
+
blobSha?: string;
|
|
80
|
+
/** The reason codes, sorted. */
|
|
81
|
+
reasons: string[];
|
|
82
|
+
githubUrl: string;
|
|
83
|
+
}
|
|
84
|
+
export interface AdminNoticeList {
|
|
85
|
+
notices: AdminNoticeSummary[];
|
|
86
|
+
refused: RefusedFile[];
|
|
87
|
+
commitSha: string;
|
|
88
|
+
readAt: string;
|
|
89
|
+
}
|
|
90
|
+
export interface AdminDelivery {
|
|
91
|
+
emailKind: EmailKind;
|
|
92
|
+
changeNo: number;
|
|
93
|
+
status: DeliveryStatus;
|
|
94
|
+
recipientCount: number;
|
|
95
|
+
sentCount: number;
|
|
96
|
+
failedCount: number;
|
|
97
|
+
attempts: number;
|
|
98
|
+
lastError?: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
sentAt?: string;
|
|
101
|
+
inAppSentAt?: string;
|
|
102
|
+
/** Set while the status is `pending`. */
|
|
103
|
+
nextAttemptAt?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface AdminNoticeOrg {
|
|
106
|
+
orgId: string;
|
|
107
|
+
inScope: boolean;
|
|
108
|
+
clusters: NoticeCluster[];
|
|
109
|
+
deliveries: AdminDelivery[];
|
|
110
|
+
}
|
|
111
|
+
export interface AdminNoticeDetail {
|
|
112
|
+
/** Left out when the notice has no good version. */
|
|
113
|
+
notice?: AdminNotice;
|
|
114
|
+
githubUrl: string;
|
|
115
|
+
refused?: RefusedFile;
|
|
116
|
+
orgs: AdminNoticeOrg[];
|
|
117
|
+
nextCursor?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface AdminOrgNotice {
|
|
120
|
+
id: string;
|
|
121
|
+
kind: NoticeKind;
|
|
122
|
+
status: NoticeStatus;
|
|
123
|
+
phase: NoticePhase;
|
|
124
|
+
title: string;
|
|
125
|
+
startsAt: string;
|
|
126
|
+
endsAt?: string;
|
|
127
|
+
inScope: boolean;
|
|
128
|
+
clusters: NoticeCluster[];
|
|
129
|
+
deliveries: AdminDelivery[];
|
|
130
|
+
githubUrl: string;
|
|
131
|
+
}
|
|
132
|
+
export interface AdminOrgNotices {
|
|
133
|
+
orgId: string;
|
|
134
|
+
notices: AdminOrgNotice[];
|
|
135
|
+
}
|
|
136
|
+
export interface ErrorBody {
|
|
137
|
+
message: string;
|
|
138
|
+
/** The HTTP status. */
|
|
139
|
+
type: number;
|
|
140
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=infra-notices.types.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequestBaseParamsConfig } from '../types/general.types.js';
|
|
2
|
-
export type ServiceName = 'accounts' | 'console' | 'control' | 'audit-logger' | 'notifications' | 'login' | 'login-internal' | 'comm-bridge' | 'telemetry' | 'alert-distributor' | 'analytic-bridge' | 'wordpress-helpcenter';
|
|
2
|
+
export type ServiceName = 'accounts' | 'console' | 'control' | 'audit-logger' | 'notifications' | 'login' | 'login-internal' | 'comm-bridge' | 'telemetry' | 'alert-distributor' | 'analytic-bridge' | 'wordpress-helpcenter' | 'infra-notices';
|
|
3
3
|
export type ServiceAudience = 'camunda-cloud-audience' | 'comm-bridge-audience' | 'notification-audience' | 'analytics-audience';
|
|
4
4
|
export interface EnvironmentParam {
|
|
5
5
|
id: ServiceName | ServiceAudience;
|
|
@@ -86,6 +86,13 @@ const ENV_PARAMS = [
|
|
|
86
86
|
int: "https://camunda-help-stg.mystagingwebsite.com",
|
|
87
87
|
prod: "https://camunda-helpcenter.mystagingwebsite.com"
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
id: "infra-notices",
|
|
91
|
+
dev: "https://infra-notices.cloud.dev.ultrawombat.com",
|
|
92
|
+
devAws: "https://infra-notices.cloud.dev.ultrawombat.com",
|
|
93
|
+
int: "https://infra-notices.cloud.ultrawombat.com",
|
|
94
|
+
prod: "https://infra-notices.cloud.camunda.io"
|
|
95
|
+
},
|
|
89
96
|
// AUDIENCES
|
|
90
97
|
{
|
|
91
98
|
id: "camunda-cloud-audience",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/environments.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { RequestBaseParamsConfig } from '../types/general.types.js'\n\nexport type ServiceName =\n | 'accounts'\n | 'console'\n | 'control'\n | 'audit-logger'\n | 'notifications'\n | 'login'\n | 'login-internal'\n | 'comm-bridge'\n | 'telemetry'\n | 'alert-distributor'\n | 'analytic-bridge'\n | 'wordpress-helpcenter'\n\nexport type ServiceAudience =\n | 'camunda-cloud-audience'\n | 'comm-bridge-audience'\n | 'notification-audience'\n | 'analytics-audience'\n\nexport interface EnvironmentParam {\n id: ServiceName | ServiceAudience\n dev: string\n devAws: string\n int: string\n prod: string\n}\n\nconst ENV_PARAMS: EnvironmentParam[] = [\n {\n id: 'notifications',\n dev: 'https://notifications.cloud.dev.ultrawombat.com',\n devAws: 'https://notifications.cloud.dev.ultrawombat.com',\n int: 'https://notifications.cloud.ultrawombat.com',\n prod: 'https://notifications.cloud.camunda.io',\n },\n {\n id: 'console',\n dev: 'https://console.cloud.dev.ultrawombat.com',\n devAws: 'https://console-aws.cloud.dev.ultrawombat.com',\n int: 'https://console.cloud.ultrawombat.com',\n prod: 'https://console.cloud.camunda.io',\n },\n {\n id: 'accounts',\n dev: 'https://accounts.cloud.dev.ultrawombat.com',\n devAws: 'https://accounts-aws.cloud.dev.ultrawombat.com',\n int: 'https://accounts.cloud.ultrawombat.com',\n prod: 'https://accounts.cloud.camunda.io',\n },\n {\n // control-backend, the four-eyes approval service. It deploys to dev, int\n // and prod, and the names follow the pattern of every other service of\n // the fleet.\n id: 'control',\n dev: 'https://control.cloud.dev.ultrawombat.com',\n devAws: 'https://control.cloud.dev.ultrawombat.com',\n int: 'https://control.cloud.ultrawombat.com',\n prod: 'https://control.cloud.camunda.io',\n },\n {\n id: 'audit-logger',\n dev: 'https://audit.cloud.dev.ultrawombat.com',\n devAws: 'https://audit-logger.cloud.dev.ultrawombat.com',\n int: 'https://audit.cloud.ultrawombat.com',\n prod: 'https://audit.cloud.camunda.io',\n },\n {\n id: 'analytic-bridge',\n dev: 'https://analytics.cloud.dev.ultrawombat.com',\n devAws: 'https://analytics-bridge.cloud.dev.ultrawombat.com',\n int: 'https://analytics.cloud.ultrawombat.com',\n prod: 'https://analytics.cloud.camunda.io',\n },\n {\n id: 'login',\n dev: 'https://login.cloud.dev.ultrawombat.com',\n devAws: 'https://login.cloud.dev.ultrawombat.com',\n int: 'https://login.cloud.ultrawombat.com',\n prod: 'https://login.cloud.camunda.io',\n },\n {\n id: 'login-internal',\n dev: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n devAws: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n int: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n prod: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n },\n {\n id: 'comm-bridge',\n dev: 'https://comm.cloud.dev.ultrawombat.com',\n devAws: 'https://comm.cloud.dev.ultrawombat.com',\n int: 'https://comm.cloud.ultrawombat.com',\n prod: 'https://comm.cloud.camunda.io',\n },\n {\n id: 'telemetry',\n dev: 'https://telemetry.cloud.dev.ultrawombat.com',\n devAws: 'https://telemetry.cloud.dev.ultrawombat.com',\n int: 'https://telemetry.cloud.ultrawombat.com',\n prod: 'https://telemetry.cloud.camunda.io',\n },\n {\n id: 'alert-distributor',\n dev: 'https://alert-distributor.cloud.dev.ultrawombat.com',\n devAws: 'https://alert-distributor.cloud.dev.ultrawombat.com',\n int: 'https://alert-distributor.cloud.ultrawombat.com',\n prod: 'https://alert-distributor.cloud.camunda.io',\n },\n {\n id: 'wordpress-helpcenter',\n dev: 'https://camunda-help-stg.mystagingwebsite.com',\n devAws: 'https://camunda-help-stg.mystagingwebsite.com',\n int: 'https://camunda-help-stg.mystagingwebsite.com',\n prod: 'https://camunda-helpcenter.mystagingwebsite.com',\n },\n // AUDIENCES\n {\n id: 'camunda-cloud-audience',\n dev: 'cloud.dev.ultrawombat.com',\n devAws: 'cloud.dev.ultrawombat.com',\n int: 'cloud.ultrawombat.com',\n prod: 'cloud.camunda.io',\n },\n {\n id: 'comm-bridge-audience',\n dev: 'comm.dev.ultrawombat.com',\n devAws: 'comm.dev.ultrawombat.com',\n int: 'comm.ultrawombat.com',\n prod: 'comm.camunda.io',\n },\n {\n id: 'notification-audience',\n dev: 'notifications.dev.ultrawombat.com',\n devAws: 'notifications.dev.ultrawombat.com',\n int: 'notifications.ultrawombat.com',\n prod: 'notifications.camunda.io',\n },\n {\n id: 'analytics-audience',\n dev: 'analytics.dev.ultrawombat.com',\n devAws: 'analytics.dev.ultrawombat.com',\n int: 'analytics.ultrawombat.com',\n prod: 'analytics.camunda.io',\n },\n]\n\nexport function getEnvParam(\n id: ServiceName | ServiceAudience,\n config: RequestBaseParamsConfig,\n) {\n if (config.envOverride?.[id] && config.envOverride[id].length > 0) {\n return config.envOverride[id]\n }\n\n if (\n (id === 'console' && config.stage === 'localconsole') ||\n (id === 'accounts' && config.stage === 'localaccounts')\n ) {\n // special handling if running console/accounts frontend and backend locally\n return `http://localhost:8080`\n }\n\n const envParam = ENV_PARAMS.find(\n (environmentParam) => environmentParam.id === id,\n )\n if (!envParam) {\n throw new Error(`Unknown id: ${id}`)\n }\n switch (config.stage) {\n case 'local':\n case 'localconsole':\n case 'localaccounts':\n case 'dev':\n return envParam.dev\n case 'devAws':\n return envParam.devAws\n case 'int':\n return envParam.int\n case 'prod':\n return envParam.prod\n default:\n throw new Error(`Unknown stage: ${config.stage}`)\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { RequestBaseParamsConfig } from '../types/general.types.js'\n\nexport type ServiceName =\n | 'accounts'\n | 'console'\n | 'control'\n | 'audit-logger'\n | 'notifications'\n | 'login'\n | 'login-internal'\n | 'comm-bridge'\n | 'telemetry'\n | 'alert-distributor'\n | 'analytic-bridge'\n | 'wordpress-helpcenter'\n | 'infra-notices'\n\nexport type ServiceAudience =\n | 'camunda-cloud-audience'\n | 'comm-bridge-audience'\n | 'notification-audience'\n | 'analytics-audience'\n\nexport interface EnvironmentParam {\n id: ServiceName | ServiceAudience\n dev: string\n devAws: string\n int: string\n prod: string\n}\n\nconst ENV_PARAMS: EnvironmentParam[] = [\n {\n id: 'notifications',\n dev: 'https://notifications.cloud.dev.ultrawombat.com',\n devAws: 'https://notifications.cloud.dev.ultrawombat.com',\n int: 'https://notifications.cloud.ultrawombat.com',\n prod: 'https://notifications.cloud.camunda.io',\n },\n {\n id: 'console',\n dev: 'https://console.cloud.dev.ultrawombat.com',\n devAws: 'https://console-aws.cloud.dev.ultrawombat.com',\n int: 'https://console.cloud.ultrawombat.com',\n prod: 'https://console.cloud.camunda.io',\n },\n {\n id: 'accounts',\n dev: 'https://accounts.cloud.dev.ultrawombat.com',\n devAws: 'https://accounts-aws.cloud.dev.ultrawombat.com',\n int: 'https://accounts.cloud.ultrawombat.com',\n prod: 'https://accounts.cloud.camunda.io',\n },\n {\n // control-backend, the four-eyes approval service. It deploys to dev, int\n // and prod, and the names follow the pattern of every other service of\n // the fleet.\n id: 'control',\n dev: 'https://control.cloud.dev.ultrawombat.com',\n devAws: 'https://control.cloud.dev.ultrawombat.com',\n int: 'https://control.cloud.ultrawombat.com',\n prod: 'https://control.cloud.camunda.io',\n },\n {\n id: 'audit-logger',\n dev: 'https://audit.cloud.dev.ultrawombat.com',\n devAws: 'https://audit-logger.cloud.dev.ultrawombat.com',\n int: 'https://audit.cloud.ultrawombat.com',\n prod: 'https://audit.cloud.camunda.io',\n },\n {\n id: 'analytic-bridge',\n dev: 'https://analytics.cloud.dev.ultrawombat.com',\n devAws: 'https://analytics-bridge.cloud.dev.ultrawombat.com',\n int: 'https://analytics.cloud.ultrawombat.com',\n prod: 'https://analytics.cloud.camunda.io',\n },\n {\n id: 'login',\n dev: 'https://login.cloud.dev.ultrawombat.com',\n devAws: 'https://login.cloud.dev.ultrawombat.com',\n int: 'https://login.cloud.ultrawombat.com',\n prod: 'https://login.cloud.camunda.io',\n },\n {\n id: 'login-internal',\n dev: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n devAws: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n int: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n prod: 'http://token-issuer.token-issuer.svc.cluster.local:8080',\n },\n {\n id: 'comm-bridge',\n dev: 'https://comm.cloud.dev.ultrawombat.com',\n devAws: 'https://comm.cloud.dev.ultrawombat.com',\n int: 'https://comm.cloud.ultrawombat.com',\n prod: 'https://comm.cloud.camunda.io',\n },\n {\n id: 'telemetry',\n dev: 'https://telemetry.cloud.dev.ultrawombat.com',\n devAws: 'https://telemetry.cloud.dev.ultrawombat.com',\n int: 'https://telemetry.cloud.ultrawombat.com',\n prod: 'https://telemetry.cloud.camunda.io',\n },\n {\n id: 'alert-distributor',\n dev: 'https://alert-distributor.cloud.dev.ultrawombat.com',\n devAws: 'https://alert-distributor.cloud.dev.ultrawombat.com',\n int: 'https://alert-distributor.cloud.ultrawombat.com',\n prod: 'https://alert-distributor.cloud.camunda.io',\n },\n {\n id: 'wordpress-helpcenter',\n dev: 'https://camunda-help-stg.mystagingwebsite.com',\n devAws: 'https://camunda-help-stg.mystagingwebsite.com',\n int: 'https://camunda-help-stg.mystagingwebsite.com',\n prod: 'https://camunda-helpcenter.mystagingwebsite.com',\n },\n {\n id: 'infra-notices',\n dev: 'https://infra-notices.cloud.dev.ultrawombat.com',\n devAws: 'https://infra-notices.cloud.dev.ultrawombat.com',\n int: 'https://infra-notices.cloud.ultrawombat.com',\n prod: 'https://infra-notices.cloud.camunda.io',\n },\n // AUDIENCES\n {\n id: 'camunda-cloud-audience',\n dev: 'cloud.dev.ultrawombat.com',\n devAws: 'cloud.dev.ultrawombat.com',\n int: 'cloud.ultrawombat.com',\n prod: 'cloud.camunda.io',\n },\n {\n id: 'comm-bridge-audience',\n dev: 'comm.dev.ultrawombat.com',\n devAws: 'comm.dev.ultrawombat.com',\n int: 'comm.ultrawombat.com',\n prod: 'comm.camunda.io',\n },\n {\n id: 'notification-audience',\n dev: 'notifications.dev.ultrawombat.com',\n devAws: 'notifications.dev.ultrawombat.com',\n int: 'notifications.ultrawombat.com',\n prod: 'notifications.camunda.io',\n },\n {\n id: 'analytics-audience',\n dev: 'analytics.dev.ultrawombat.com',\n devAws: 'analytics.dev.ultrawombat.com',\n int: 'analytics.ultrawombat.com',\n prod: 'analytics.camunda.io',\n },\n]\n\nexport function getEnvParam(\n id: ServiceName | ServiceAudience,\n config: RequestBaseParamsConfig,\n) {\n if (config.envOverride?.[id] && config.envOverride[id].length > 0) {\n return config.envOverride[id]\n }\n\n if (\n (id === 'console' && config.stage === 'localconsole') ||\n (id === 'accounts' && config.stage === 'localaccounts')\n ) {\n // special handling if running console/accounts frontend and backend locally\n return `http://localhost:8080`\n }\n\n const envParam = ENV_PARAMS.find(\n (environmentParam) => environmentParam.id === id,\n )\n if (!envParam) {\n throw new Error(`Unknown id: ${id}`)\n }\n switch (config.stage) {\n case 'local':\n case 'localconsole':\n case 'localaccounts':\n case 'dev':\n return envParam.dev\n case 'devAws':\n return envParam.devAws\n case 'int':\n return envParam.int\n case 'prod':\n return envParam.prod\n default:\n throw new Error(`Unknown stage: ${config.stage}`)\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/ccma-api",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0",
|
|
4
4
|
"description": "Centralized API service layer for Camunda Cloud Management Apps",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@camunda/ccma-shared-types": "19.
|
|
44
|
+
"@camunda/ccma-shared-types": "19.2.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "node esbuild.mjs && tsc --emitDeclarationOnly --outDir dist",
|