@forge/sql 0.1.0 → 2.0.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.
@@ -2,5 +2,6 @@ export declare const errorCodes: {
2
2
  SQL_EXECUTION_ERROR: string;
3
3
  INVALID_SQL_QUERY: string;
4
4
  QUERY_TIMED_OUT: string;
5
+ APP_NOT_ENABLED: string;
5
6
  };
6
7
  //# sourceMappingURL=errorCodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../src/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;CAItB,CAAC"}
1
+ {"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../src/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC"}
package/out/errorCodes.js CHANGED
@@ -4,5 +4,6 @@ exports.errorCodes = void 0;
4
4
  exports.errorCodes = {
5
5
  SQL_EXECUTION_ERROR: 'SQL_EXECUTION_ERROR',
6
6
  INVALID_SQL_QUERY: 'INVALID_SQL_QUERY',
7
- QUERY_TIMED_OUT: 'QUERY_TIMED_OUT'
7
+ QUERY_TIMED_OUT: 'QUERY_TIMED_OUT',
8
+ APP_NOT_ENABLED: 'APP_NOT_ENABLED'
8
9
  };
package/out/sql.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D,qBAAa,SAAS;YACN,WAAW;IAYnB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,EAAE,MAAM,SAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5F,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAI9B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI1C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CASlC;AAED,eAAO,MAAM,GAAG,WAAkB,CAAC"}
1
+ {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D,qBAAa,SAAS;YACN,WAAW;IAYnB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,EAAE,MAAM,SAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5F,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAI9B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI1C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAMlC;AAED,eAAO,MAAM,GAAG,WAAkB,CAAC"}
package/out/sql.js CHANGED
@@ -30,14 +30,10 @@ class SqlClient {
30
30
  return await this.prepare(query).execute();
31
31
  }
32
32
  async _provision() {
33
- try {
34
- await this.sendRequest('/api/v1/provision', {
35
- method: 'POST'
36
- });
37
- }
38
- catch (e) {
39
- throw e;
40
- }
33
+ const response = await this.sendRequest('/api/v1/provision', {
34
+ method: 'POST'
35
+ });
36
+ await (0, response_handler_1.getResponseBody)(response);
41
37
  }
42
38
  }
43
39
  exports.SqlClient = SqlClient;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@forge/sql",
3
- "version": "0.1.0",
4
- "description": "Forge SQL package",
3
+ "version": "2.0.0",
4
+ "description": "Forge SQL sdk",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
7
7
  "main": "out/index.js",