@hobenakicoffee/libraries 1.9.0 → 1.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hobenakicoffee/libraries",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "types": "src/index.ts",
6
6
  "exports": {
@@ -4,7 +4,7 @@ import type { ServiceType } from "./services";
4
4
 
5
5
  describe("ServiceTypes", () => {
6
6
  test("should contain all expected service type keys", () => {
7
- const expectedKeys = ["GIFT", "EXCLUSIVE_CONTENT", "WITHDRAWAL"];
7
+ const expectedKeys = ["GIFT", "EXCLUSIVE_CONTENT", "WITHDRAWAL", "FOLLOW"];
8
8
  expect(Object.keys(ServiceTypes)).toEqual(expectedKeys);
9
9
  });
10
10
 
@@ -12,6 +12,7 @@ describe("ServiceTypes", () => {
12
12
  expect(ServiceTypes.GIFT).toBe("gift");
13
13
  expect(ServiceTypes.EXCLUSIVE_CONTENT).toBe("exclusive_content");
14
14
  expect(ServiceTypes.WITHDRAWAL).toBe("withdrawal");
15
+ expect(ServiceTypes.FOLLOW).toBe("follow");
15
16
  });
16
17
 
17
18
  test("should be read-only at compile time", () => {
@@ -26,8 +27,8 @@ describe("ServiceTypes", () => {
26
27
  expect(validType).toBe("gift");
27
28
  });
28
29
 
29
- test("should have 2 service types", () => {
30
- expect(Object.keys(ServiceTypes).length).toBe(3);
30
+ test("should have 4 service types", () => {
31
+ expect(Object.keys(ServiceTypes).length).toBe(4);
31
32
  });
32
33
 
33
34
  test("all values should be lowercase or snake_case strings", () => {
@@ -2,6 +2,7 @@ export const ServiceTypes = {
2
2
  GIFT: "gift",
3
3
  EXCLUSIVE_CONTENT: "exclusive_content",
4
4
  WITHDRAWAL: "withdrawal",
5
+ FOLLOW: "follow",
5
6
  } as const;
6
7
 
7
8
  export type ServiceType = (typeof ServiceTypes)[keyof typeof ServiceTypes];
@@ -18,7 +18,7 @@ export type Database = {
18
18
  reference_id: string
19
19
  role: string
20
20
  service_type: string
21
- transaction_id: string
21
+ transaction_id: string | null
22
22
  updated_at: string
23
23
  user_profile_id: string
24
24
  visibility: Database["public"]["Enums"]["visibility_enum"]
@@ -31,7 +31,7 @@ export type Database = {
31
31
  reference_id: string
32
32
  role: string
33
33
  service_type?: string
34
- transaction_id: string
34
+ transaction_id?: string | null
35
35
  updated_at?: string
36
36
  user_profile_id: string
37
37
  visibility?: Database["public"]["Enums"]["visibility_enum"]
@@ -44,7 +44,7 @@ export type Database = {
44
44
  reference_id?: string
45
45
  role?: string
46
46
  service_type?: string
47
- transaction_id?: string
47
+ transaction_id?: string | null
48
48
  updated_at?: string
49
49
  user_profile_id?: string
50
50
  visibility?: Database["public"]["Enums"]["visibility_enum"]