@narrative.io/data-collaboration-sdk-ts 0.0.62 → 0.0.64
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/build/apps/index.d.ts +17 -0
- package/build/apps/index.js +20 -0
- package/build/apps/types.d.ts +89 -0
- package/build/apps/types.js +2 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +2 -1
- package/build/nql/types.d.ts +351 -351
- package/build/nql/types.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ApiRecords } from '../types';
|
|
2
|
+
import { BaseApi } from '../base-api';
|
|
3
|
+
import { type App } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* @module AppsApi
|
|
6
|
+
* @description This module provides methods for fetching app records.
|
|
7
|
+
* @extends BaseApi
|
|
8
|
+
*/
|
|
9
|
+
declare class AppsApi extends BaseApi {
|
|
10
|
+
/**
|
|
11
|
+
* Get all installations for the current user
|
|
12
|
+
* @param {number} appCategory - An optional filter for app categories.
|
|
13
|
+
* @returns {Promise<ApiRecords<Installation>>} - Promise resolving with the list of installations.
|
|
14
|
+
*/
|
|
15
|
+
getApps(appCategory?: string): Promise<ApiRecords<App>>;
|
|
16
|
+
}
|
|
17
|
+
export { type App, AppsApi };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseApi } from '../base-api';
|
|
2
|
+
const resourceName = 'apps';
|
|
3
|
+
/**
|
|
4
|
+
* @module AppsApi
|
|
5
|
+
* @description This module provides methods for fetching app records.
|
|
6
|
+
* @extends BaseApi
|
|
7
|
+
*/
|
|
8
|
+
class AppsApi extends BaseApi {
|
|
9
|
+
/**
|
|
10
|
+
* Get all installations for the current user
|
|
11
|
+
* @param {number} appCategory - An optional filter for app categories.
|
|
12
|
+
* @returns {Promise<ApiRecords<Installation>>} - Promise resolving with the list of installations.
|
|
13
|
+
*/
|
|
14
|
+
async getApps(appCategory) {
|
|
15
|
+
const appCategoryQuery = appCategory !== undefined ? `?app_category=${appCategory}` : '';
|
|
16
|
+
const url = `${resourceName}${appCategoryQuery}`;
|
|
17
|
+
return await this.get(url);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export { AppsApi };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export interface App {
|
|
2
|
+
id: number;
|
|
3
|
+
manifest: {
|
|
4
|
+
name: string;
|
|
5
|
+
headline_image: Image;
|
|
6
|
+
background_color: string;
|
|
7
|
+
short_description: string;
|
|
8
|
+
long_description: string;
|
|
9
|
+
merchandising_sections: MerchandisingSection[];
|
|
10
|
+
icons: Image[];
|
|
11
|
+
version: string;
|
|
12
|
+
release_notes: string;
|
|
13
|
+
base_url: string;
|
|
14
|
+
categories: string[];
|
|
15
|
+
status: string;
|
|
16
|
+
developer_information: DeveloperInformation;
|
|
17
|
+
pages: Page[];
|
|
18
|
+
tiers: Tier[];
|
|
19
|
+
app_token_scopes: Scope[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface Image {
|
|
23
|
+
name: string;
|
|
24
|
+
image: string;
|
|
25
|
+
image_type: string;
|
|
26
|
+
alt_text: string;
|
|
27
|
+
width?: number;
|
|
28
|
+
height?: number;
|
|
29
|
+
}
|
|
30
|
+
interface MerchandisingSection {
|
|
31
|
+
title: string;
|
|
32
|
+
subtitle: string;
|
|
33
|
+
order: number;
|
|
34
|
+
image: Image;
|
|
35
|
+
}
|
|
36
|
+
interface DeveloperInformation {
|
|
37
|
+
name: string;
|
|
38
|
+
website: string;
|
|
39
|
+
support_email: string;
|
|
40
|
+
privacy_policy: string;
|
|
41
|
+
}
|
|
42
|
+
interface Navigation {
|
|
43
|
+
title: string;
|
|
44
|
+
icon: string;
|
|
45
|
+
tiers: TierNavigation[];
|
|
46
|
+
}
|
|
47
|
+
interface Page {
|
|
48
|
+
eligible_path: string;
|
|
49
|
+
navigation: Navigation;
|
|
50
|
+
}
|
|
51
|
+
interface TierNavigation {
|
|
52
|
+
tier_id: string;
|
|
53
|
+
rule: string;
|
|
54
|
+
}
|
|
55
|
+
interface PriceSpecification {
|
|
56
|
+
type: string;
|
|
57
|
+
}
|
|
58
|
+
interface Cta {
|
|
59
|
+
text: string;
|
|
60
|
+
action: string;
|
|
61
|
+
url: string;
|
|
62
|
+
}
|
|
63
|
+
interface Scope {
|
|
64
|
+
access: string;
|
|
65
|
+
resource: string;
|
|
66
|
+
}
|
|
67
|
+
interface QuickSetting {
|
|
68
|
+
id: string;
|
|
69
|
+
display_name: string;
|
|
70
|
+
schema: Schema;
|
|
71
|
+
description: string;
|
|
72
|
+
}
|
|
73
|
+
interface Schema {
|
|
74
|
+
type: string;
|
|
75
|
+
pattern: string;
|
|
76
|
+
}
|
|
77
|
+
interface Tier {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
short_description: string;
|
|
81
|
+
long_description: string;
|
|
82
|
+
price_specifications: PriceSpecification[];
|
|
83
|
+
status: string;
|
|
84
|
+
cta: Cta;
|
|
85
|
+
required_scopes: Scope[];
|
|
86
|
+
services: string[];
|
|
87
|
+
quick_settings: QuickSetting[];
|
|
88
|
+
}
|
|
89
|
+
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -22,8 +22,9 @@ import { ForecastApi, type ForecastRequest, type ForecastResponse, type CostFore
|
|
|
22
22
|
import { ContractsApi, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView } from './contracts';
|
|
23
23
|
import { getNqlObject, buildNql } from './nql/NQLParser';
|
|
24
24
|
import { AuthenticationApi, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken } from './authentication';
|
|
25
|
+
import { AppsApi, type App } from './apps';
|
|
25
26
|
declare class NarrativeApi extends BaseApi {
|
|
26
27
|
}
|
|
27
28
|
interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi {
|
|
28
29
|
}
|
|
29
|
-
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, type Resource, type UploadsResponse, type PingStatus, type Attribute, type Environment, type Config, type ApiRecords, type Dataset, type HealthCheckResult, type SampleRecords, type DatasetTableSummary, type DatasetTableSummaryAPIResponse, type Product, type MonetaryAmount, type CompanyInfo, type Installation, type FilePerSnapshotResponse, type BucketCreationRequest, type UpdateAccessTypeRequest, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, getNqlObject, buildNql };
|
|
30
|
+
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, type App, type Resource, type UploadsResponse, type PingStatus, type Attribute, type Environment, type Config, type ApiRecords, type Dataset, type HealthCheckResult, type SampleRecords, type DatasetTableSummary, type DatasetTableSummaryAPIResponse, type Product, type MonetaryAmount, type CompanyInfo, type Installation, type FilePerSnapshotResponse, type BucketCreationRequest, type UpdateAccessTypeRequest, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, getNqlObject, buildNql };
|
package/build/index.js
CHANGED
|
@@ -16,7 +16,8 @@ import { ForecastApi } from './forecast';
|
|
|
16
16
|
import { ContractsApi } from './contracts';
|
|
17
17
|
import { getNqlObject, buildNql } from './nql/NQLParser';
|
|
18
18
|
import { AuthenticationApi } from './authentication';
|
|
19
|
+
import { AppsApi } from './apps';
|
|
19
20
|
class NarrativeApi extends BaseApi {
|
|
20
21
|
}
|
|
21
22
|
applyMixins(NarrativeApi, [BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi]);
|
|
22
|
-
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, getNqlObject, buildNql };
|
|
23
|
+
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, getNqlObject, buildNql };
|