@ogcio/building-blocks-sdk 0.0.4 → 0.0.5
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/clients-configurations/clients-configuration.json +8 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +2 -1
- package/src/clients-configurations/clients-configuration.json +8 -0
- package/src/index.ts +7 -2
- package/src/types/index.ts +4 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"buildingBlocks": [
|
|
3
|
+
{
|
|
4
|
+
"name": "analytics",
|
|
5
|
+
"openApiDefinitionUrl": "",
|
|
6
|
+
"openApiDefinitionFormat": "yaml",
|
|
7
|
+
"updateDefinitions": false,
|
|
8
|
+
"citizenPermissions": [],
|
|
9
|
+
"publicServantPermissions": []
|
|
10
|
+
},
|
|
3
11
|
{
|
|
4
12
|
"name": "messaging",
|
|
5
13
|
"openApiDefinitionUrl": "https://raw.githubusercontent.com/ogcio/life-events/refs/heads/dev/apps/messaging-api/openapi-definition.yml",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type { BuildingBlocksSDK } from "./types/index.js";
|
|
2
|
-
export { default as getM2MTokenFn } from "./client/auth/index.js";
|
|
3
2
|
import type { BuildingBlockSDKParams, BuildingBlocksSDK } from "./types/index.js";
|
|
4
3
|
declare const getBuildingBlockSDK: (params: BuildingBlockSDKParams) => BuildingBlocksSDK;
|
|
5
4
|
export default getBuildingBlockSDK;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAElB,MAAM,kBAAkB,CAAC;AAE1B,QAAA,MAAM,mBAAmB,WACf,sBAAsB,KAC7B,iBA4BF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { Analytics } from "@ogcio/analytics-sdk";
|
|
1
2
|
import Messaging from "./client/clients/messaging/index.js";
|
|
2
3
|
import Payments from "./client/clients/payments/index.js";
|
|
3
4
|
import Profile from "./client/clients/profile/index.js";
|
|
4
5
|
import Scheduler from "./client/clients/scheduler/index.js";
|
|
5
6
|
import Upload from "./client/clients/upload/index.js";
|
|
6
|
-
export { default as getM2MTokenFn } from "./client/auth/index.js";
|
|
7
7
|
const getBuildingBlockSDK = (params) => {
|
|
8
8
|
const { services, getTokenFn } = params;
|
|
9
9
|
return {
|
|
10
|
+
analytics: new Analytics({
|
|
11
|
+
...services.analytics,
|
|
12
|
+
getTokenFn,
|
|
13
|
+
}),
|
|
10
14
|
messaging: new Messaging({
|
|
11
15
|
...services.messaging,
|
|
12
16
|
getTokenFn,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,qCAAqC,CAAC;AAC5D,OAAO,QAAQ,MAAM,oCAAoC,CAAC;AAC1D,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,SAAS,MAAM,qCAAqC,CAAC;AAC5D,OAAO,MAAM,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,SAAS,MAAM,qCAAqC,CAAC;AAC5D,OAAO,QAAQ,MAAM,oCAAoC,CAAC;AAC1D,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,SAAS,MAAM,qCAAqC,CAAC;AAC5D,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAStD,MAAM,mBAAmB,GAAG,CAC1B,MAA8B,EACX,EAAE;IACrB,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IACxC,OAAO;QACL,SAAS,EAAE,IAAI,SAAS,CAAC;YACvB,GAAG,QAAQ,CAAC,SAAS;YACrB,UAAU;SACX,CAAC;QACF,SAAS,EAAE,IAAI,SAAS,CAAC;YACvB,GAAG,QAAQ,CAAC,SAAS;YACrB,UAAU;SACX,CAAC;QACF,QAAQ,EAAE,IAAI,QAAQ,CAAC;YACrB,GAAG,QAAQ,CAAC,QAAQ;YACpB,UAAU;SACX,CAAC;QACF,OAAO,EAAE,IAAI,OAAO,CAAC;YACnB,GAAG,QAAQ,CAAC,OAAO;YACnB,UAAU;SACX,CAAC;QACF,SAAS,EAAE,IAAI,SAAS,CAAC;YACvB,GAAG,QAAQ,CAAC,SAAS;YACrB,UAAU;SACX,CAAC;QACF,MAAM,EAAE,IAAI,MAAM,CAAC;YACjB,GAAG,QAAQ,CAAC,MAAM;YAClB,UAAU;SACX,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import type { Analytics } from "@ogcio/analytics-sdk";
|
|
1
2
|
import type Messaging from "../client/clients/messaging/index.js";
|
|
2
3
|
import type Payments from "../client/clients/payments/index.js";
|
|
3
4
|
import type Profile from "../client/clients/profile/index.js";
|
|
4
5
|
import type Scheduler from "../client/clients/scheduler/index.js";
|
|
5
6
|
import type Upload from "../client/clients/upload/index.js";
|
|
7
|
+
export declare const ANALYTICS: "analytics";
|
|
6
8
|
export declare const MESSAGING: "messaging";
|
|
7
9
|
export declare const PAYMENTS: "payments";
|
|
8
10
|
export declare const PROFILE: "profile";
|
|
9
11
|
export declare const SCHEDULER: "scheduler";
|
|
10
12
|
export declare const UPLOAD: "upload";
|
|
11
|
-
export type SERVICE_NAME = typeof MESSAGING | typeof PAYMENTS | typeof PROFILE | typeof SCHEDULER | typeof UPLOAD;
|
|
13
|
+
export type SERVICE_NAME = typeof ANALYTICS | typeof MESSAGING | typeof PAYMENTS | typeof PROFILE | typeof SCHEDULER | typeof UPLOAD;
|
|
12
14
|
export type TokenFunction = (serviceName: SERVICE_NAME) => Promise<string> | string;
|
|
13
15
|
export type M2MParams = {
|
|
14
16
|
getOrganizationTokenParams?: GetOrganizationTokenParams;
|
|
@@ -26,6 +28,7 @@ export type BaseApiClientParams = SDKClientParams & {
|
|
|
26
28
|
getTokenFn?: TokenFunction;
|
|
27
29
|
};
|
|
28
30
|
type ServiceClients = {
|
|
31
|
+
analytics: typeof Analytics;
|
|
29
32
|
messaging: typeof Messaging;
|
|
30
33
|
payments: typeof Payments;
|
|
31
34
|
profile: typeof Profile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,QAAQ,MAAM,qCAAqC,CAAC;AAChE,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAE5D,eAAO,MAAM,SAAS,aAAuB,CAAC;AAC9C,eAAO,MAAM,QAAQ,YAAsB,CAAC;AAC5C,eAAO,MAAM,OAAO,WAAqB,CAAC;AAC1C,eAAO,MAAM,SAAS,aAAuB,CAAC;AAC9C,eAAO,MAAM,MAAM,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M,CAAC;CACf;AAED,UAAU,kBAAkB;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACpE,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,SAAS,GAAG,WAAoB,CAAC;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAoB,CAAC;AAC9C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAmB,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,SAAkB,CAAC;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAoB,CAAC;AAC9C,MAAM,CAAC,MAAM,MAAM,GAAG,QAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogcio/building-blocks-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"prepare": "husky || true"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@ogcio/analytics-sdk": "0.0.1-beta.1",
|
|
19
20
|
"@sinclair/typebox": "^0.33.15",
|
|
20
21
|
"commander": "^12.1.0",
|
|
21
22
|
"http-errors": "^2.0.0",
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"buildingBlocks": [
|
|
3
|
+
{
|
|
4
|
+
"name": "analytics",
|
|
5
|
+
"openApiDefinitionUrl": "",
|
|
6
|
+
"openApiDefinitionFormat": "yaml",
|
|
7
|
+
"updateDefinitions": false,
|
|
8
|
+
"citizenPermissions": [],
|
|
9
|
+
"publicServantPermissions": []
|
|
10
|
+
},
|
|
3
11
|
{
|
|
4
12
|
"name": "messaging",
|
|
5
13
|
"openApiDefinitionUrl": "https://raw.githubusercontent.com/ogcio/life-events/refs/heads/dev/apps/messaging-api/openapi-definition.yml",
|
package/src/index.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { Analytics } from "@ogcio/analytics-sdk";
|
|
2
|
+
|
|
1
3
|
import Messaging from "./client/clients/messaging/index.js";
|
|
2
4
|
import Payments from "./client/clients/payments/index.js";
|
|
3
5
|
import Profile from "./client/clients/profile/index.js";
|
|
4
6
|
import Scheduler from "./client/clients/scheduler/index.js";
|
|
5
7
|
import Upload from "./client/clients/upload/index.js";
|
|
6
|
-
|
|
7
8
|
export type { BuildingBlocksSDK } from "./types/index.js";
|
|
8
|
-
export { default as getM2MTokenFn } from "./client/auth/index.js";
|
|
9
9
|
|
|
10
10
|
import type {
|
|
11
11
|
BuildingBlockSDKParams,
|
|
12
12
|
BuildingBlocksSDK,
|
|
13
|
+
TokenFunction,
|
|
13
14
|
} from "./types/index.js";
|
|
14
15
|
|
|
15
16
|
const getBuildingBlockSDK = (
|
|
@@ -17,6 +18,10 @@ const getBuildingBlockSDK = (
|
|
|
17
18
|
): BuildingBlocksSDK => {
|
|
18
19
|
const { services, getTokenFn } = params;
|
|
19
20
|
return {
|
|
21
|
+
analytics: new Analytics({
|
|
22
|
+
...services.analytics,
|
|
23
|
+
getTokenFn,
|
|
24
|
+
}),
|
|
20
25
|
messaging: new Messaging({
|
|
21
26
|
...services.messaging,
|
|
22
27
|
getTokenFn,
|
package/src/types/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { Analytics } from "@ogcio/analytics-sdk";
|
|
1
2
|
import type Messaging from "../client/clients/messaging/index.js";
|
|
2
3
|
import type Payments from "../client/clients/payments/index.js";
|
|
3
4
|
import type Profile from "../client/clients/profile/index.js";
|
|
4
5
|
import type Scheduler from "../client/clients/scheduler/index.js";
|
|
5
6
|
import type Upload from "../client/clients/upload/index.js";
|
|
6
7
|
|
|
8
|
+
export const ANALYTICS = "analytics" as const;
|
|
7
9
|
export const MESSAGING = "messaging" as const;
|
|
8
10
|
export const PAYMENTS = "payments" as const;
|
|
9
11
|
export const PROFILE = "profile" as const;
|
|
@@ -11,6 +13,7 @@ export const SCHEDULER = "scheduler" as const;
|
|
|
11
13
|
export const UPLOAD = "upload" as const;
|
|
12
14
|
|
|
13
15
|
export type SERVICE_NAME =
|
|
16
|
+
| typeof ANALYTICS
|
|
14
17
|
| typeof MESSAGING
|
|
15
18
|
| typeof PAYMENTS
|
|
16
19
|
| typeof PROFILE
|
|
@@ -41,6 +44,7 @@ export type BaseApiClientParams = SDKClientParams & {
|
|
|
41
44
|
};
|
|
42
45
|
|
|
43
46
|
type ServiceClients = {
|
|
47
|
+
analytics: typeof Analytics;
|
|
44
48
|
messaging: typeof Messaging;
|
|
45
49
|
payments: typeof Payments;
|
|
46
50
|
profile: typeof Profile;
|