skapi-js 1.8.2 → 2.0.0-rc.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/skapi.d.mts CHANGED
@@ -51,7 +51,7 @@ type GetRecordQuery = {
51
51
  record_id?: string;
52
52
  /** Table name not required when "record_id" is given. A bare string is shorthand for { name: <string> }. */
53
53
  table?: string | {
54
- /** Max 128 chars. Blocks: / ! * #, control chars, and sentinel 􏿿. */
54
+ /** Max 256 characters, where / ! * # % each count as 3. Blocks control chars and sentinel 􏿿. */
55
55
  name: string;
56
56
  /** Number range: 0 ~ 99. Default: 'public' */
57
57
  access_group?: number | 'private' | 'public' | 'authorized' | 'admin';
@@ -65,9 +65,9 @@ type GetRecordQuery = {
65
65
  };
66
66
  /** Index condition and range cannot be used simultaneously.*/
67
67
  index?: {
68
- /** Custom names: max 128 chars, cannot start with "$", blocks / ! * #, control chars, and sentinel 􏿿. Reserved names: $uploaded, $updated, $referenced_count, $user_id. */
68
+ /** Custom names: max 256 characters, where / ! * # % each count as 3. Cannot start with "$". Blocks control chars and sentinel 􏿿. Reserved names: $uploaded, $updated, $referenced_count, $user_id. */
69
69
  name: string | '$updated' | '$uploaded' | '$referenced_count' | '$user_id';
70
- /** String value max 256 chars. Allows punctuation (including / ! * #). Blocks control chars and sentinel 􏿿. */
70
+ /** String value max 256 characters. Any punctuation is allowed and counts as one character, and values compare exactly as written. Blocks control chars and sentinel 􏿿. */
71
71
  value: string | number | boolean;
72
72
  /** For a string value: '>=' = 'starts with', '<=' = 'ends with'. When the name is a compound name ending in '.', '>=' / '<=' match the child name segment (starts / ends with). '>' / '<' are lexicographic; numbers/booleans compare normally. */
73
73
  condition?: Condition;
@@ -81,7 +81,7 @@ type PostRecordConfig = {
81
81
  readonly?: boolean;
82
82
  /** Table name not required when "record_id" is given.*/
83
83
  table?: {
84
- /** Max 128 chars. Blocks: / ! * #, control chars, and sentinel 􏿿. */
84
+ /** Max 256 characters, where / ! * # % each count as 3. Blocks control chars and sentinel 􏿿. */
85
85
  name?: string;
86
86
  /** Number range: 0 ~ 99. Default: 'public' */
87
87
  access_group?: number | 'private' | 'public' | 'authorized' | 'admin';
@@ -114,9 +114,9 @@ type PostRecordConfig = {
114
114
  reference?: string | null;
115
115
  /** null removes index */
116
116
  index?: {
117
- /** Max 128 chars, cannot start with "$", blocks / ! * #, control chars, and sentinel 􏿿. */
117
+ /** Max 256 characters, where / ! * # % each count as 3. Cannot start with "$". Blocks control chars and sentinel 􏿿. */
118
118
  name: string;
119
- /** String value max 256 chars. Allows punctuation (including / ! * #). Blocks control chars and sentinel 􏿿. */
119
+ /** String value max 256 characters. Any punctuation is allowed and counts as one character, and values compare exactly as written. Blocks control chars and sentinel 􏿿. */
120
120
  value: string | number | boolean;
121
121
  } | null;
122
122
  tags?: string[] | null;
@@ -519,6 +519,8 @@ type FileInfo = {
519
519
  fileKey: string;
520
520
  };
521
521
  type ConnectionInfo = {
522
+ /** Public project ID (service + owner composed into the two-segment token). Empty when the service has no uuid owner. */
523
+ project_id: string;
522
524
  user_ip: string;
523
525
  user_agent: string;
524
526
  user_location: string;
@@ -638,7 +640,7 @@ declare function extractFormData(form: FormData | HTMLFormElement | SubmitEvent
638
640
  file: File;
639
641
  }[];
640
642
  };
641
- declare function decodeServiceId(service: any): {
643
+ declare function decodeProjectId(service: any): {
642
644
  service: any;
643
645
  owner: any;
644
646
  };
@@ -662,6 +664,13 @@ declare class Skapi {
662
664
  private __version;
663
665
  service: string;
664
666
  owner: string;
667
+ /**
668
+ * The public project ID: the single two-segment token composed from service + owner
669
+ * (the same value formatServiceId returns, and the form external tools accept).
670
+ * Empty string when the service has no uuid owner (e.g. host-owned), since the
671
+ * compound form cannot be built without one.
672
+ */
673
+ project_id: string;
665
674
  session: Record<string, any> | null;
666
675
  connection: Connection | null;
667
676
  /**
@@ -729,7 +738,7 @@ declare class Skapi {
729
738
  generateRandom: typeof generateRandom;
730
739
  toBase62: typeof toBase62;
731
740
  fromBase62: typeof fromBase62;
732
- decodeServiceId: typeof decodeServiceId;
741
+ decodeProjectId: typeof decodeProjectId;
733
742
  formatServiceId: typeof formatServiceId;
734
743
  extractFormData: typeof extractFormData;
735
744
  terminatePendingRequests: typeof terminatePendingRequests;
@@ -744,6 +753,8 @@ declare class Skapi {
744
753
  accessToken?: boolean | string;
745
754
  idToken?: boolean | string;
746
755
  };
756
+ stableGateway?: boolean;
757
+ revalidate?: boolean;
747
758
  }) => any;
748
759
  };
749
760
  private __connection;
@@ -1199,6 +1210,8 @@ declare class Skapi {
1199
1210
  config?: {
1200
1211
  dataType?: 'base64' | 'download' | 'endpoint' | 'blob' | 'text' | 'info';
1201
1212
  expires?: number;
1213
+ browserCache?: number;
1214
+ refresh?: boolean;
1202
1215
  progress?: ProgressCallback;
1203
1216
  }): Promise<Blob | string | void | FileInfo>;
1204
1217
  /**
package/dist/skapi.d.ts CHANGED
@@ -51,7 +51,7 @@ type GetRecordQuery = {
51
51
  record_id?: string;
52
52
  /** Table name not required when "record_id" is given. A bare string is shorthand for { name: <string> }. */
53
53
  table?: string | {
54
- /** Max 128 chars. Blocks: / ! * #, control chars, and sentinel 􏿿. */
54
+ /** Max 256 characters, where / ! * # % each count as 3. Blocks control chars and sentinel 􏿿. */
55
55
  name: string;
56
56
  /** Number range: 0 ~ 99. Default: 'public' */
57
57
  access_group?: number | 'private' | 'public' | 'authorized' | 'admin';
@@ -65,9 +65,9 @@ type GetRecordQuery = {
65
65
  };
66
66
  /** Index condition and range cannot be used simultaneously.*/
67
67
  index?: {
68
- /** Custom names: max 128 chars, cannot start with "$", blocks / ! * #, control chars, and sentinel 􏿿. Reserved names: $uploaded, $updated, $referenced_count, $user_id. */
68
+ /** Custom names: max 256 characters, where / ! * # % each count as 3. Cannot start with "$". Blocks control chars and sentinel 􏿿. Reserved names: $uploaded, $updated, $referenced_count, $user_id. */
69
69
  name: string | '$updated' | '$uploaded' | '$referenced_count' | '$user_id';
70
- /** String value max 256 chars. Allows punctuation (including / ! * #). Blocks control chars and sentinel 􏿿. */
70
+ /** String value max 256 characters. Any punctuation is allowed and counts as one character, and values compare exactly as written. Blocks control chars and sentinel 􏿿. */
71
71
  value: string | number | boolean;
72
72
  /** For a string value: '>=' = 'starts with', '<=' = 'ends with'. When the name is a compound name ending in '.', '>=' / '<=' match the child name segment (starts / ends with). '>' / '<' are lexicographic; numbers/booleans compare normally. */
73
73
  condition?: Condition;
@@ -81,7 +81,7 @@ type PostRecordConfig = {
81
81
  readonly?: boolean;
82
82
  /** Table name not required when "record_id" is given.*/
83
83
  table?: {
84
- /** Max 128 chars. Blocks: / ! * #, control chars, and sentinel 􏿿. */
84
+ /** Max 256 characters, where / ! * # % each count as 3. Blocks control chars and sentinel 􏿿. */
85
85
  name?: string;
86
86
  /** Number range: 0 ~ 99. Default: 'public' */
87
87
  access_group?: number | 'private' | 'public' | 'authorized' | 'admin';
@@ -114,9 +114,9 @@ type PostRecordConfig = {
114
114
  reference?: string | null;
115
115
  /** null removes index */
116
116
  index?: {
117
- /** Max 128 chars, cannot start with "$", blocks / ! * #, control chars, and sentinel 􏿿. */
117
+ /** Max 256 characters, where / ! * # % each count as 3. Cannot start with "$". Blocks control chars and sentinel 􏿿. */
118
118
  name: string;
119
- /** String value max 256 chars. Allows punctuation (including / ! * #). Blocks control chars and sentinel 􏿿. */
119
+ /** String value max 256 characters. Any punctuation is allowed and counts as one character, and values compare exactly as written. Blocks control chars and sentinel 􏿿. */
120
120
  value: string | number | boolean;
121
121
  } | null;
122
122
  tags?: string[] | null;
@@ -519,6 +519,8 @@ type FileInfo = {
519
519
  fileKey: string;
520
520
  };
521
521
  type ConnectionInfo = {
522
+ /** Public project ID (service + owner composed into the two-segment token). Empty when the service has no uuid owner. */
523
+ project_id: string;
522
524
  user_ip: string;
523
525
  user_agent: string;
524
526
  user_location: string;
@@ -638,7 +640,7 @@ declare function extractFormData(form: FormData | HTMLFormElement | SubmitEvent
638
640
  file: File;
639
641
  }[];
640
642
  };
641
- declare function decodeServiceId(service: any): {
643
+ declare function decodeProjectId(service: any): {
642
644
  service: any;
643
645
  owner: any;
644
646
  };
@@ -662,6 +664,13 @@ declare class Skapi {
662
664
  private __version;
663
665
  service: string;
664
666
  owner: string;
667
+ /**
668
+ * The public project ID: the single two-segment token composed from service + owner
669
+ * (the same value formatServiceId returns, and the form external tools accept).
670
+ * Empty string when the service has no uuid owner (e.g. host-owned), since the
671
+ * compound form cannot be built without one.
672
+ */
673
+ project_id: string;
665
674
  session: Record<string, any> | null;
666
675
  connection: Connection | null;
667
676
  /**
@@ -729,7 +738,7 @@ declare class Skapi {
729
738
  generateRandom: typeof generateRandom;
730
739
  toBase62: typeof toBase62;
731
740
  fromBase62: typeof fromBase62;
732
- decodeServiceId: typeof decodeServiceId;
741
+ decodeProjectId: typeof decodeProjectId;
733
742
  formatServiceId: typeof formatServiceId;
734
743
  extractFormData: typeof extractFormData;
735
744
  terminatePendingRequests: typeof terminatePendingRequests;
@@ -744,6 +753,8 @@ declare class Skapi {
744
753
  accessToken?: boolean | string;
745
754
  idToken?: boolean | string;
746
755
  };
756
+ stableGateway?: boolean;
757
+ revalidate?: boolean;
747
758
  }) => any;
748
759
  };
749
760
  private __connection;
@@ -1199,6 +1210,8 @@ declare class Skapi {
1199
1210
  config?: {
1200
1211
  dataType?: 'base64' | 'download' | 'endpoint' | 'blob' | 'text' | 'info';
1201
1212
  expires?: number;
1213
+ browserCache?: number;
1214
+ refresh?: boolean;
1202
1215
  progress?: ProgressCallback;
1203
1216
  }): Promise<Blob | string | void | FileInfo>;
1204
1217
  /**