@geolonia/geonicdb-sdk 0.15.0 → 0.16.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/geonicdb.d.ts CHANGED
@@ -281,6 +281,30 @@ export interface GetTemporalEntitiesParams {
281
281
  */
282
282
  options?: string;
283
283
  }
284
+ /**
285
+ * `GET /ngsi-ld/v1/types`(`details` 未指定)のレスポンス。
286
+ * ETSI GS CIM 009 / OpenAPI v1.8.1 の `EntityTypeList`(5.2.24)。
287
+ * `details=true` の場合は代わりに `EntityType` の配列が返る(本 SDK では未対応)。
288
+ */
289
+ export interface EntityTypeList {
290
+ id: string;
291
+ type: "EntityTypeList";
292
+ /** 利用可能なエンティティ型名の配列 */
293
+ typeList: string[];
294
+ "@context"?: string | string[];
295
+ }
296
+ /**
297
+ * `GET /ngsi-ld/v1/attributes`(`details` 未指定)のレスポンス。
298
+ * ETSI GS CIM 009 / OpenAPI v1.8.1 の `AttributeList`(5.2.27)。
299
+ * `details=true` の場合は代わりに `Attribute` の配列が返る(本 SDK では未対応)。
300
+ */
301
+ export interface AttributeList {
302
+ id: string;
303
+ type: "AttributeList";
304
+ /** 利用可能な属性名の配列 */
305
+ attributeList: string[];
306
+ "@context"?: string | string[];
307
+ }
284
308
  export type Listener<T> = (data: T) => void;
285
309
  declare class EventEmitter {
286
310
  private _listeners;
@@ -478,12 +502,24 @@ export declare class GeonicDB extends EventEmitter {
478
502
  deleteEntity(entityId: string): Promise<{
479
503
  deleted: true;
480
504
  }>;
481
- /** List all entity types. */
482
- getTypes(): Promise<Record<string, unknown>[]>;
505
+ /**
506
+ * List all entity types.
507
+ *
508
+ * `details` 未指定の `GET /types` は ETSI OpenAPI v1.8.1 準拠の
509
+ * `EntityTypeList` オブジェクト(`{ id, type: 'EntityTypeList', typeList }`)を返す。
510
+ * 型名の一覧は `typeList` から取得する。
511
+ */
512
+ getTypes(): Promise<EntityTypeList>;
483
513
  /** Get details for a specific entity type. */
484
514
  getType(typeName: string): Promise<Record<string, unknown>>;
485
- /** List all attributes. */
486
- getAttributes(): Promise<Record<string, unknown>[]>;
515
+ /**
516
+ * List all attributes.
517
+ *
518
+ * `details` 未指定の `GET /attributes` は ETSI OpenAPI v1.8.1 準拠の
519
+ * `AttributeList` オブジェクト(`{ id, type: 'AttributeList', attributeList }`)を返す。
520
+ * 属性名の一覧は `attributeList` から取得する。
521
+ */
522
+ getAttributes(): Promise<AttributeList>;
487
523
  /** Get details for a specific attribute. */
488
524
  getAttribute(attrName: string): Promise<Record<string, unknown>>;
489
525
  /** Query temporal entities. */
package/geonicdb.iife.js CHANGED
@@ -82,7 +82,7 @@ var GeonicDBModule = (() => {
82
82
  var RECONNECT_BASE_MS = 1e3;
83
83
  var RECONNECT_MAX_DELAY_MS = 3e4;
84
84
  var SUB_PROTOCOL = "access_token";
85
- var NGSI_LD_CORE_CONTEXT = "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld";
85
+ var NGSI_LD_CORE_CONTEXT = "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.9.jsonld";
86
86
  var SDK_CACHE_MAX_ENTRIES_DEFAULT = 1e3;
87
87
  var SDK_POLL_INTERVAL_MS_DEFAULT = 5e3;
88
88
  var DPOP_IDB_NAME = "geonicdb-sdk";
@@ -1967,7 +1967,13 @@ var GeonicDBModule = (() => {
1967
1967
  return { deleted: true };
1968
1968
  }
1969
1969
  // --- Types / Attributes Discovery ---
1970
- /** List all entity types. */
1970
+ /**
1971
+ * List all entity types.
1972
+ *
1973
+ * `details` 未指定の `GET /types` は ETSI OpenAPI v1.8.1 準拠の
1974
+ * `EntityTypeList` オブジェクト(`{ id, type: 'EntityTypeList', typeList }`)を返す。
1975
+ * 型名の一覧は `typeList` から取得する。
1976
+ */
1971
1977
  async getTypes() {
1972
1978
  return this._jsonGet("/ngsi-ld/v1/types", "Types query failed");
1973
1979
  }
@@ -1978,7 +1984,13 @@ var GeonicDBModule = (() => {
1978
1984
  "Type not found"
1979
1985
  );
1980
1986
  }
1981
- /** List all attributes. */
1987
+ /**
1988
+ * List all attributes.
1989
+ *
1990
+ * `details` 未指定の `GET /attributes` は ETSI OpenAPI v1.8.1 準拠の
1991
+ * `AttributeList` オブジェクト(`{ id, type: 'AttributeList', attributeList }`)を返す。
1992
+ * 属性名の一覧は `attributeList` から取得する。
1993
+ */
1982
1994
  async getAttributes() {
1983
1995
  return this._jsonGet("/ngsi-ld/v1/attributes", "Attributes query failed");
1984
1996
  }