@trayio/tray-api 4.76.0 → 4.77.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.
@@ -0,0 +1,3 @@
1
+ import { ConnectorNamespaceApi } from './ConnectorNamespaceApi';
2
+ export declare const connectorNamespaceApiTest: (namespaceClient: ConnectorNamespaceApi) => void;
3
+ //# sourceMappingURL=ConnectorNamespaceApi.abstract.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectorNamespaceApi.abstract.test.d.ts","sourceRoot":"","sources":["../../../src/connector/namespace/ConnectorNamespaceApi.abstract.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAO,MAAM,yBAAyB,oBACpB,qBAAqB,SAuBtC,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.connectorNamespaceApiTest = void 0;
4
+ const Result_1 = require("@trayio/commons/result/Result");
5
+ const API_TOKEN = process.env.API_TOKEN;
6
+ const connectorNamespaceApiTest = (namespaceClient) => {
7
+ describe('ConnectorNamespaceApi', () => {
8
+ it('should be defined', () => {
9
+ expect(namespaceClient).toBeDefined();
10
+ });
11
+ it('gets the namespace for the provided orgId', async () => {
12
+ const input = {
13
+ organizationId: 'organization-id',
14
+ token: API_TOKEN,
15
+ };
16
+ const response = await namespaceClient.get(input);
17
+ expect(response).toEqual(Result_1.Result.success({
18
+ organizationId: expect.any(String),
19
+ namespace: expect.any(String),
20
+ }));
21
+ });
22
+ });
23
+ };
24
+ exports.connectorNamespaceApiTest = connectorNamespaceApiTest;
@@ -0,0 +1,13 @@
1
+ import { Result } from '@trayio/commons/result/Result';
2
+ import { RequestWithToken } from '../../base/Api';
3
+ export interface ConnectorNamespaceApi {
4
+ get: ({ organizationId, token, }: GetConnectorNamespace) => Promise<Result<Error, ConnectorNamespace>>;
5
+ }
6
+ export type GetConnectorNamespace = RequestWithToken & {
7
+ organizationId: string;
8
+ };
9
+ export type ConnectorNamespace = {
10
+ organizationId: string;
11
+ namespace: string;
12
+ };
13
+ //# sourceMappingURL=ConnectorNamespaceApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectorNamespaceApi.d.ts","sourceRoot":"","sources":["../../../src/connector/namespace/ConnectorNamespaceApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACrC,GAAG,EAAE,CAAC,EACL,cAAc,EACd,KAAK,GACL,EAAE,qBAAqB,KAAK,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;CACxE;AAED,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG;IACtD,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayio/tray-api",
3
- "version": "4.76.0",
3
+ "version": "4.77.0",
4
4
  "description": "A library for interacting with the Tray.io API",
5
5
  "exports": {
6
6
  "./*": "./dist/*.js"